Skip to content

Commit

Permalink
Use version catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
pshevche committed Mar 14, 2024
1 parent b868bfd commit e146f53
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
16 changes: 9 additions & 7 deletions develocity-gradle-plugin-adapters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ sourceSets {
create("develocityCompatibility")
}

fun sourceSet(name: String): SourceSetOutput = sourceSets[name].output

dependencies {
"compatibilityApiCompileOnly"(gradleApi())

"enterpriseCompatibilityCompileOnly"(gradleApi())
"enterpriseCompatibilityCompileOnly"("com.gradle:gradle-enterprise-gradle-plugin:3.16.2")
"enterpriseCompatibilityImplementation"(sourceSets["compatibilityApi"].output)
"enterpriseCompatibilityCompileOnly"(libs.gradle.enterprise.plugin)
"enterpriseCompatibilityImplementation"(sourceSet("compatibilityApi"))

"develocityCompatibilityCompileOnly"(gradleApi())
"develocityCompatibilityCompileOnly"("com.gradle:develocity-gradle-plugin:3.17-rc-4")
"develocityCompatibilityImplementation"(sourceSets["compatibilityApi"].output)
"develocityCompatibilityCompileOnly"(libs.develocity.plugin)
"develocityCompatibilityImplementation"(sourceSet("compatibilityApi"))
}

java {
Expand All @@ -37,8 +39,8 @@ java {
}

tasks.jar {
from(sourceSets["compatibilityApi"].output)
from(sourceSets["enterpriseCompatibility"].output)
from(sourceSets["develocityCompatibility"].output)
from(sourceSet("compatibilityApi"))
from(sourceSet("enterpriseCompatibility"))
from(sourceSet("develocityCompatibility"))
}

22 changes: 12 additions & 10 deletions develocity-maven-plugin-adapters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@ sourceSets {
create("develocityCompatibility")
}

fun sourceSet(name: String): SourceSetOutput = sourceSets[name].output

dependencies {
"compatibilityApiCompileOnly"("org.apache.maven:maven-core:3.9.6")
"compatibilityApiCompileOnly"(libs.maven.core)

"enterpriseCompatibilityCompileOnly"("org.apache.maven:maven-core:3.9.6")
"enterpriseCompatibilityCompileOnly"("com.gradle:gradle-enterprise-maven-extension:1.20.1")
"enterpriseCompatibilityImplementation"(sourceSets["compatibilityApi"].output)
"enterpriseCompatibilityCompileOnly"(libs.maven.core)
"enterpriseCompatibilityCompileOnly"(libs.gradle.enterprise.extension)
"enterpriseCompatibilityImplementation"(sourceSet("compatibilityApi"))

"develocityCompatibilityCompileOnly"("org.apache.maven:maven-core:3.9.6")
"develocityCompatibilityCompileOnly"("com.gradle:develocity-maven-extension:1.21-rc-5")
"develocityCompatibilityImplementation"(sourceSets["compatibilityApi"].output)
"develocityCompatibilityCompileOnly"(libs.maven.core)
"develocityCompatibilityCompileOnly"(libs.develocity.extension)
"develocityCompatibilityImplementation"(sourceSet("compatibilityApi"))
}

tasks.jar {
from(sourceSets["compatibilityApi"].output)
from(sourceSets["enterpriseCompatibility"].output)
from(sourceSets["develocityCompatibility"].output)
from(sourceSet("compatibilityApi"))
from(sourceSet("enterpriseCompatibility"))
from(sourceSet("develocityCompatibility"))
}
13 changes: 5 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[versions]
commons-math3 = "3.6.1"
guava = "32.1.2-jre"
junit-jupiter = "5.10.0"

[libraries]
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
gradle-enterprise-plugin = { module = "com.gradle:gradle-enterprise-gradle-plugin", version = "3.16.2" }
develocity-plugin = { module = "com.gradle:develocity-gradle-plugin", version = "3.17-rc-4" }
maven-core = { module = "org.apache.maven:maven-core", version = "3.9.6" }
gradle-enterprise-extension = { module = "com.gradle:gradle-enterprise-maven-extension", version = "1.20.1" }
develocity-extension = { module = "com.gradle:develocity-maven-extension", version = "1.21-rc-5" }

0 comments on commit e146f53

Please sign in to comment.