You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: build.gradle.kts
+26-30Lines changed: 26 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -51,38 +51,34 @@ val shadowTask: ShadowJar = tasks.withType(ShadowJar::class.java) {
51
51
minimize()
52
52
}.first()
53
53
54
-
val jarAndroid by tasks.registering {
54
+
val jarAndroid by tasks.registering(Exec::class) {
55
55
dependsOn(shadowTask)
56
56
val inFile = shadowTask.archiveFile.get().asFile
57
57
val outFile = inFile.resolveSibling("${shadowTask.archiveBaseName.get()}-Android.jar")
58
58
outputs.file(outFile)
59
-
doLast {
60
-
val sdkRoot =System.getenv("ANDROID_HOME") ?:System.getenv("ANDROID_SDK_ROOT")
61
-
if (sdkRoot ==null||!File(sdkRoot).exists()) throwGradleException("No valid Android SDK found. Ensure that ANDROID_HOME is set to your Android SDK directory.")
62
-
63
-
val buildToolsDir =File(sdkRoot, "build-tools")
64
-
val d8Tool = buildToolsDir.listFiles()?.sortedDescending()
val sdkRoot =System.getenv("ANDROID_HOME") ?:System.getenv("ANDROID_SDK_ROOT")
62
+
if (sdkRoot ==null||!File(sdkRoot).exists()) throwGradleException("No valid Android SDK found. Ensure that ANDROID_HOME is set to your Android SDK directory.")
63
+
64
+
val buildToolsDir =File(sdkRoot, "build-tools")
65
+
val d8Tool = buildToolsDir.listFiles()?.sortedDescending()
0 commit comments