Skip to content

Commit

Permalink
build: Adjusted external JTrim URL to follow the modularized pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
kelemen committed Aug 13, 2023
1 parent e08d93e commit e29c682
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/org/jtrim2/build/JTrimJavaPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.gradle.kotlin.dsl.withType
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension

private const val JAVADOC_URL_PATTERN_JDK = "https://docs.oracle.com/en/java/javase/\${version}/docs/api/"
private const val JAVADOC_JTRIM_URL = "https://www.javadoc.io/doc/\${group}/\${name}/\${version}/"
private const val JAVADOC_JTRIM_URL = "https://www.javadoc.io/doc/\${group}/\${name}/\${version}/\${javaModuleName}/"

class JTrimJavaPlugin @Inject constructor(private val toolchainService: JavaToolchainService) : Plugin<Project> {
override fun apply(project: Project) {
Expand Down Expand Up @@ -165,6 +165,7 @@ class JTrimJavaPlugin @Inject constructor(private val toolchainService: JavaTool
versionOverride: String?
): String {
return getJavadocUrl(project, "java", JAVADOC_JTRIM_URL)
.replace("\${javaModuleName}", ProjectUtils.getModuleName(projectDependency))
.replace("\${group}", projectDependency.group.toString())
.replace("\${name}", projectDependency.name)
.replace("\${version}", versionOverride ?: Versions.getVersion(projectDependency))
Expand Down

0 comments on commit e29c682

Please sign in to comment.