Skip to content

Commit

Permalink
remove shadowjars
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon committed Sep 22, 2023
1 parent 3dc75a0 commit 9d67a54
Showing 1 changed file with 39 additions and 37 deletions.
76 changes: 39 additions & 37 deletions fullstack-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,59 @@

plugins {
id("java-gradle-plugin")
id("com.github.johnrengelman.shadow").version("8.1.1")
// id("com.github.johnrengelman.shadow").version("8.1.1")
id("com.gradle.plugin-publish").version("1.2.1")
id("com.hedera.fullstack.conventions")
id("com.hedera.fullstack.maven-publish")
}

// 'internal' for dependencies that are not visible in tests and are not published
// because things are shadowed
val internal = configurations.create("internal")

configurations.compileClasspath { extendsFrom(internal) }

configurations.runtimeClasspath { extendsFrom(internal) }

configurations.apiElements {
outgoing {
artifacts.clear()
artifact(tasks.shadowJar)
}
}

configurations.runtimeElements {
outgoing {
artifacts.clear()
artifact(tasks.shadowJar)
}
}
//val internal = configurations.create("internal")
//
//configurations.compileClasspath { extendsFrom(internal) }
//
//configurations.runtimeClasspath { extendsFrom(internal) }
//
//configurations.apiElements {
// outgoing {
// artifacts.clear()
// artifact(tasks.shadowJar)
// }
//}
//
//configurations.runtimeElements {
// outgoing {
// artifacts.clear()
// artifact(tasks.shadowJar)
// }
//}

dependencies {
internal(platform(project(":fullstack-bom")))
internal(project(":fullstack-helm-client"))
api(platform(project(":fullstack-bom")))
implementation(project(":fullstack-helm-client"))
// internal(platform(project(":fullstack-bom")))
// internal(project(":fullstack-helm-client"))
// TODO: update SLF4J impl for no fluent api and remove shadowjars
// testImplementation(platform(project(":fullstack-bom")))
testImplementation(project(":fullstack-helm-client"))
// testImplementation(project(":fullstack-helm-client"))
// testRuntimeOnly("org.slf4j:slf4j-simple")
}

tasks.shadowJar {
relocationPrefix = "com.hedera.fullstack.shadowed"
archiveClassifier.set("")
manifest { attributes("Multi-Release" to "true") }

relocate("com.fasterxml", "com.hedera.fullstack.shadowed.com.fasterxml")
relocate("org.slf4j", "com.hedera.fullstack.shadowed.org.slf4j")
// TODO: exclude("com.hedera.fullstack.helm.client")
}

tasks.test {
// Use the shadow Jar with everything included instead of the classes folder
classpath = files(tasks.shadowJar) + sourceSets.test.get().runtimeClasspath
}
//tasks.shadowJar {
// relocationPrefix = "com.hedera.fullstack.shadowed"
// archiveClassifier.set("")
// manifest { attributes("Multi-Release" to "true") }
//
// relocate("com.fasterxml", "com.hedera.fullstack.shadowed.com.fasterxml")
// relocate("org.slf4j", "com.hedera.fullstack.shadowed.org.slf4j")
// // TODO: exclude("com.hedera.fullstack.helm.client")
//}
//
//tasks.test {
// // Use the shadow Jar with everything included instead of the classes folder
// classpath = files(tasks.shadowJar) + sourceSets.test.get().runtimeClasspath
//}

gradlePlugin {
plugins {
Expand Down

0 comments on commit 9d67a54

Please sign in to comment.