Skip to content

Commit

Permalink
Use org.openrewrite.tools jgit. Get rid of vestigial slf4j usage in r…
Browse files Browse the repository at this point in the history
…ewrite-core
  • Loading branch information
sambsnyd committed Mar 28, 2024
1 parent 152606f commit 5815658
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 2,621 deletions.
1 change: 0 additions & 1 deletion rewrite-benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
}

dependencies {
jmh("org.eclipse.jgit:org.eclipse.jgit:5.13.+")
jmh("com.google.code.findbugs:jsr305:latest.release")
jmh("org.projectlombok:lombok:latest.release")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void setup() throws URISyntaxException {

sourceFiles = JavaParser.fromJavaVersion()
.classpath("jsr305", "classgraph", "jackson-annotations", "micrometer-core", "slf4j-api",
"org.eclipse.jgit")
"org.openrewrite.jgit")
// .logCompilationWarningsAndErrors(true)
.build()
.parse(inputs, null, new InMemoryExecutionContext(Throwable::printStackTrace))
Expand Down
26 changes: 1 addition & 25 deletions rewrite-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("org.openrewrite.build.language-library")
id("org.openrewrite.build.shadow")
}

dependencies {
// Pin to 5.x for Java 8, as 6.x requires Java 11
compileOnly("org.eclipse.jgit:org.eclipse.jgit:5.13.+")

api("org.openrewrite.tools:jgit:latest.release")
implementation("org.openrewrite.tools:java-object-diff:latest.release")

implementation("io.quarkus.gizmo:gizmo:1.0.+")

api("com.fasterxml.jackson.core:jackson-databind")
api("com.fasterxml.jackson.dataformat:jackson-dataformat-smile")
api("com.fasterxml.jackson.module:jackson-module-parameter-names")
Expand All @@ -30,21 +23,4 @@ dependencies {
implementation("org.yaml:snakeyaml:latest.release")

testImplementation(project(":rewrite-test"))
testImplementation("org.eclipse.jgit:org.eclipse.jgit:5.13.+")
}

val shadowJar = tasks.named<ShadowJar>("shadowJar") {
dependencies {
include(dependency("org.eclipse.jgit:"))
}
relocate("org.eclipse.jgit", "org.openrewrite.shaded.jgit")
metaInf {
from("$rootDir/LICENSE")
from("$rootDir/NOTICE")
}
}

tasks.named<Test>("test").configure {
dependsOn(shadowJar)
classpath = files(shadowJar, sourceSets.test.get().output, configurations.testRuntimeClasspath)
}
Loading

0 comments on commit 5815658

Please sign in to comment.