diff options
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 154215c..46deb21 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,6 +47,8 @@ val shadowImpl: Configuration by configurations.creating { configurations.implementation.get().extendsFrom(this) } +val agentDeps: Configuration by configurations.creating + val shadowOnly: Configuration by configurations.creating { attributes { this.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 16) @@ -63,10 +65,18 @@ dependencies { shadowImpl("com.github.Skytils:AsmHelper:91ecc2bd9c") shadowImpl(enforcedPlatform(kotlin("bom"))) shadowImpl(kotlin("stdlib")) + agentDeps(project(":agent",configuration = "agentShadow")) } // Tasks: +val doubleWrappedJar by tasks.creating(Zip::class) { + archiveFileName.set("agent.jar") + destinationDirectory.set(project.layout.buildDirectory.dir("wrapper")) + from(agentDeps) + into("agent") +} + tasks.withType(JavaCompile::class) { options.encoding = "UTF-8" } @@ -97,6 +107,7 @@ tasks.shadowJar { archiveClassifier.set("all-dev") relocate("dev.falsehonesty.asmhelper", "moe.nea.modernjava.dep.asmhelper") configurations = listOf(shadowImpl, shadowOnly) + from(doubleWrappedJar) } tasks.assemble.get().dependsOn(tasks.remapJar) |