Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions analyzer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ idea.module {
}
}

val functionalTest = tasks.register<Test>("functionalTest") {
tasks.register<Test>("functionalTest") {
description = "Runs functional tests"
group = "verification"
testClassesDirs = sourceSets["functionalTest"].output.classesDirs
Expand Down Expand Up @@ -168,22 +168,13 @@ tasks {
}
}

// Implicit dependencies detected by Gradle 7
// See <https://docs.gradle.org/7.0/userguide/validation_problems.html#implicit_dependency>
tasks.named("check") {
dependsOn(functionalTest)
}

tasks.named("delombok") {
dependsOn("spotlessJava")
}

tasks.named("test") {
dependsOn("shadowJar")
}

tasks.named("functionalTest") {
dependsOn("shadowJar")
// We publish the init gradle file to make it easy for tools that use the plugin to set it up
// without having to create their own init gradle file.
val analyzerFile = layout.buildDirectory.file("resources/main/analyzer-init.gradle")
val prepareAnalyzerInit = artifacts.add("default", analyzerFile.get().asFile) {
classifier = "init"
extension = "gradle"
builtBy("processResources")
}

afterEvaluate {
Expand All @@ -192,6 +183,7 @@ afterEvaluate {
getByName<MavenPublication>("pluginMaven") {
artifact(testJar.get())
artifact(testSourcesJar.get())
artifact(prepareAnalyzerInit)
}
}
}
Expand Down
31 changes: 10 additions & 21 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ tasks.withType<Wrapper>().configureEach {

tasks.getByName("afterReleaseBuild") {
dependsOn(
":publishToCentral", ":analyzer:publishPlugins", ":manipulation:publishPlugins"
":analyzer:publishPlugins", ":manipulation:publishPlugins", ":publishToCentral"
)
}

Expand Down Expand Up @@ -369,7 +369,7 @@ subprojects {
// TODO: ### shadow 9 doesn't need this?
// Make assemble/build task depend on shadowJar
tasks["assemble"].dependsOn(tasks["shadowJar"])
tasks["build"].dependsOn(tasks["shadowJar"])
// tasks["build"].dependsOn(tasks["shadowJar"])

tasks.withType<ShadowJar>().configureEach {
// ensure that a single jar is built which is the shadowed one
Expand Down Expand Up @@ -435,24 +435,6 @@ subprojects {
withType<MavenPublication> {
generatePom()
}
getByName<MavenPublication>(publicationComponent) {
// we publish the init gradle file to make it easy for tools that use
// the plugin to set it up without having to create their own init gradle file
if (project.name == "analyzer") {
artifact("${sourceSets["main"].output.resourcesDir}/analyzer-init.gradle") {
classifier = "init"
extension = "gradle"
}
tasks.configureEach {
if (name == "jar") {
if (isReleaseBuild) {
mustRunAfter("signPluginMavenPublication")
}
}
}
}
generatePom()
}
}
}
}
Expand Down Expand Up @@ -494,6 +476,12 @@ subprojects {

tasks.withType<Sign> {
onlyIf { isReleaseBuild }
// Force ordering to avoid
// Reason: Task ':analyzer:jar' uses this output of task ':analyzer:signPluginMavenPublication'
// without declaring an explicit or implicit dependency.
// dependsOn(tasks["jar"])
dependsOn(tasks["assemble"])
mustRunAfter(tasks["test"])
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -533,7 +521,8 @@ subprojects {
}

tasks.withType<Javadoc>().configureEach {
options.quiet()
// https://github.com/gradle/gradle/issues/7038
(options as StandardJavadocDocletOptions).addBooleanOption("Xdoclint:none", true)
}

tasks.withType<JavaCompile>().configureEach {
Expand Down
8 changes: 0 additions & 8 deletions cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ tasks {
attributes["Main-Class"] = "org.jboss.gm.cli.Main"
}
}

"test" {
dependsOn(":analyzer:assemble")
}
}

// Implicit dependencies detected by Gradle 7
Expand All @@ -74,10 +70,6 @@ tasks.named("test") {
}

if (org.gradle.util.GradleVersion.current() >= org.gradle.util.GradleVersion.version("5.0")) {
tasks.named("publishShadowPublicationToMavenLocal") {
dependsOn("shadowJar")
}

tasks.named("generateMetadataFileForShadowPublication") {
dependsOn("jar")
}
Expand Down
20 changes: 1 addition & 19 deletions manipulation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,28 +112,10 @@ idea.module {
}
}

val functionalTest = tasks.register<Test>("functionalTest") {
tasks.register<Test>("functionalTest") {
description = "Runs functional tests"
group = "verification"
testClassesDirs = sourceSets["functionalTest"].output.classesDirs
classpath = sourceSets["functionalTest"].runtimeClasspath
mustRunAfter(tasks["test"])
}

// Implicit dependencies detected by Gradle 7
// See <https://docs.gradle.org/7.0/userguide/validation_problems.html#implicit_dependency>
tasks.named("check") {
dependsOn(functionalTest)
}

tasks.named("delombok") {
dependsOn("spotlessJava")
}

tasks.named("test") {
dependsOn("shadowJar")
}

tasks.named("functionalTest") {
dependsOn("shadowJar")
}
Loading