Skip to content

Commit

Permalink
Fix scanDependenciesDisable usage in Gradle plugin, use Maven manag…
Browse files Browse the repository at this point in the history
…ed versions (#1342)

* Use Maven managed versions for junit and jackson in Gradle plugin, fixes #1339
* Fix `scanDependenciesDisable` usage for Gradle plugin, fixes #1321

Signed-off-by: Michael Edgar <michael@xlate.io>
  • Loading branch information
MikeEdgar authored Jan 9, 2023
1 parent 85f74ad commit 30597cb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<properties>
<version.buildhelper.plugin>3.3.0</version.buildhelper.plugin>
<jackson-bom.version>2.13.4.20221013</jackson-bom.version>
<jackson-bom.version>2.14.1</jackson-bom.version>
<version.eclipse.microprofile.config>3.0</version.eclipse.microprofile.config>
<version.io.smallrye.jandex>3.0.5</version.io.smallrye.jandex>
<version.io.smallrye.smallrye-config>3.0.0</version.io.smallrye.smallrye-config>
Expand Down
3 changes: 2 additions & 1 deletion tools/gradle-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Ignore Gradle project-specific cache directory
.gradle
# Ignore Gradle build output directory
# Ignore Gradle build output directories
bin
build
# gradle.properties generated by Maven build from src/maven-build/gradle.properties
/gradle.properties
7 changes: 5 additions & 2 deletions tools/gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ repositories {
}

dependencies {
val versionJackson: String by project
val versionJunit5: String by project

implementation("io.smallrye:smallrye-open-api-core:$version")
implementation("io.smallrye:smallrye-open-api-jaxrs:$version")
implementation("io.smallrye:smallrye-open-api-spring:$version")
implementation("io.smallrye:smallrye-open-api-vertx:$version")

testImplementation("org.junit.jupiter:junit-jupiter:5.9.1")
testImplementation("org.junit.jupiter:junit-jupiter:${versionJunit5}")
testImplementation(gradleTestKit())
testImplementation("org.assertj:assertj-core:3.24.1")
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.14.1")
testImplementation("com.fasterxml.jackson.core:jackson-databind:${versionJackson}")
}

gradlePlugin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void generate() {

Configuration config = configProvider.get();

PublishArtifactSet allArtifacts = properties.scanDependenciesDisable.get() ? config.getAllArtifacts() : null;
PublishArtifactSet allArtifacts = properties.scanDependenciesDisable.get() ? null : config.getAllArtifacts();

IndexView index = new GradleDependencyIndexCreator(getLogger()).createIndex(allArtifacts,
classesDirs);
Expand Down
2 changes: 2 additions & 0 deletions tools/gradle-plugin/src/maven-build/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
# DO ONLY MODIFY THE FILE IN src/maven-build !
#
version=${project.version}
versionJackson=${jackson-bom.version}
versionJunit5=${version.junit5}

0 comments on commit 30597cb

Please sign in to comment.