Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use provided configuration for optional language dependencies #411

23 changes: 14 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
plugins {
id("org.openrewrite.build.recipe-library") version "latest.release"
id("org.openrewrite.build.moderne-source-available-license") version "latest.release"
id("com.netflix.nebula.provided-base") version "10.0.1"
}
apply(plugin = "com.netflix.nebula.provided-base")
jevanlingen marked this conversation as resolved.
Show resolved Hide resolved

group = "org.openrewrite.recipe"
description = "The first Static Analysis and REMEDIATION tool"
Expand All @@ -17,22 +19,19 @@ dependencies {
implementation("org.openrewrite.meta:rewrite-analysis:${rewriteVersion}")
implementation("org.apache.commons:commons-text:latest.release")

// Limit transitive dependencies for downstream projects like rewrite-spring
compileOnly("org.openrewrite:rewrite-groovy")
compileOnly("org.openrewrite:rewrite-kotlin:${rewriteVersion}")
compileOnly("org.openrewrite:rewrite-csharp:${rewriteVersion}")

annotationProcessor("org.openrewrite:rewrite-templating:${rewriteVersion}")
implementation("org.openrewrite:rewrite-templating:${rewriteVersion}")
compileOnly("com.google.errorprone:error_prone_core:2.+:with-dependencies") {
compileOnly("com.google.errorprone:error_prone_core:2.+") {
exclude("com.google.auto.service", "auto-service-annotations")
}

provided("org.openrewrite:rewrite-groovy")
provided("org.openrewrite:rewrite-kotlin:${rewriteVersion}")
provided("org.openrewrite:rewrite-csharp:${rewriteVersion}")

testImplementation("org.jetbrains:annotations:24.+")
testImplementation("org.openrewrite:rewrite-groovy")
testImplementation("org.openrewrite:rewrite-kotlin:${rewriteVersion}")
testImplementation("org.openrewrite:rewrite-csharp:${rewriteVersion}")
testImplementation("org.openrewrite:rewrite-test")
testImplementation("org.jetbrains:annotations:24.+")
testImplementation("org.junit-pioneer:junit-pioneer:2.+")
testImplementation("junit:junit:4.13.2")

Expand All @@ -41,3 +40,9 @@ dependencies {
testRuntimeOnly("org.openrewrite:rewrite-java-17")
testRuntimeOnly("com.google.code.findbugs:jsr305:latest.release")
}

tasks.register("listConfigurations") {
doLast {
configurations.forEach { println(it.name) }
}
}
Loading