Skip to content

Commit

Permalink
Fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
AozoraDev committed Sep 5, 2023
1 parent 0718b52 commit d4aee0b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ android {
def dexVariants = ['Debug', 'Release']
dexVariants.each { variant ->
task "generateDex${variant}"(dependsOn: "assemble${variant}") {
def varian = variant.toLowerCase()
def androidSdkRoot = System.getenv("ANDROID_SDK_ROOT")
def d8Path = "${androidSdkRoot}/build-tools/${android.buildToolsVersion}/d8"
def outputPath = "build/outputs/dex/${variant.toLowerCase()}"
def outputPath = "build/outputs/dex/${varian}"

doFirst {
def folder = file(outputPath)
Expand All @@ -36,11 +37,11 @@ dexVariants.each { variant ->
// Help me fix it then.
commandLine "bash",
d8Path,
"--${variant.toLowerCase()}",
"--${varian}",
'--output', outputPath,
'--min-api', android.defaultConfig.minSdk,
'--lib', "${androidSdkRoot}/platforms/android-${android.compileSdk}/android.jar",
"build/intermediates/aar_main_jar/${variant}/classes.jar"
"build/intermediates/aar_main_jar/${varian}/classes.jar"
}
}
}
Expand Down

0 comments on commit d4aee0b

Please sign in to comment.