Only add the kotlin package as library jar for the proguard gradle task

This commit is contained in:
Username404-59 2021-05-04 10:33:43 +02:00
parent 548bf472ba
commit f72acaaf9a
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,7 @@ subprojects {
// The following lines are needed at least for the current version of proguard // The following lines are needed at least for the current version of proguard
dontwarn("java.**") dontwarn("java.**")
val homeDir = System.getProperty("java.home") as String val homeDir = System.getProperty("java.home") as String
libraryjars(configurations.compileClasspath) libraryjars(configurations.compileClasspath.get().filter { it.name.startsWith("kotlin") })
if (JavaVersion.current().isJava9Compatible) { if (JavaVersion.current().isJava9Compatible) {
libraryjars("$homeDir/jmods/java.base.jmod") libraryjars("$homeDir/jmods/java.base.jmod")
} else libraryjars("$homeDir/lib/rt.jar") } else libraryjars("$homeDir/lib/rt.jar")
@ -76,6 +76,7 @@ subprojects {
mixinConfig("snowygui-mixins.json") mixinConfig("snowygui-mixins.json")
refmapName = "snowygui-common-refmap.json" refmapName = "snowygui-common-refmap.json"
} }
repositories { maven(url = "https://jitpack.io") }
dependencies { dependencies {
implementation("$kotlinX:kotlinx-coroutines-core:1.4.0") implementation("$kotlinX:kotlinx-coroutines-core:1.4.0")
listOf( listOf(
@ -116,6 +117,7 @@ allprojects {
relocate("org.jetbrains", "${rootProject.group}.jetbrainslibs") relocate("org.jetbrains", "${rootProject.group}.jetbrainslibs")
relocate("com.typesafe.config", "${rootProject.group}.typesafe.config") relocate("com.typesafe.config", "${rootProject.group}.typesafe.config")
relocate("io.github.config4k", "${rootProject.group}.config4k") relocate("io.github.config4k", "${rootProject.group}.config4k")
relocate("net.arikia.dev.drpc", "${rootProject.group}.drpc")
exclude("**/*.kotlin_metadata") exclude("**/*.kotlin_metadata")
exclude("**/*.kotlin_builtins") exclude("**/*.kotlin_builtins")
exclude("META-INF/maven/**/*") exclude("META-INF/maven/**/*")