deps: fix aar issues
Fix insane build issues with the new aar system through means that I really don't understand.
This commit is contained in:
parent
5b5aa24f5c
commit
d540773664
3 changed files with 14 additions and 13 deletions
|
|
@ -93,6 +93,14 @@ dependencies {
|
||||||
// --- THIRD PARTY ---
|
// --- THIRD PARTY ---
|
||||||
|
|
||||||
// Exoplayer
|
// Exoplayer
|
||||||
|
// WARNING: THE EXOPLAYER VERSION MUST BE KEPT IN LOCK-STEP WITH THE CUSTOM AAR BLOBS.
|
||||||
|
// IF NOT, VERY UNFRIENDLY BUILD FAILURES AND CRASHES MAY ENSUE.
|
||||||
|
def exoplayerVersion = '2.16.1'
|
||||||
|
implementation("com.google.android.exoplayer:exoplayer-core:$exoplayerVersion") {
|
||||||
|
exclude group: "com.google.android.exoplayer", module: "exoplayer-extractor"
|
||||||
|
}
|
||||||
|
implementation fileTree(dir: "libs", include: ["library-*.aar"])
|
||||||
|
implementation fileTree(dir: "libs", include: ["extension-*.aar"])
|
||||||
|
|
||||||
// Image loading
|
// Image loading
|
||||||
implementation 'io.coil-kt:coil:2.0.0-alpha06'
|
implementation 'io.coil-kt:coil:2.0.0-alpha06'
|
||||||
|
|
@ -104,16 +112,6 @@ dependencies {
|
||||||
|
|
||||||
// Lint
|
// Lint
|
||||||
ktlint 'com.pinterest:ktlint:0.43.2'
|
ktlint 'com.pinterest:ktlint:0.43.2'
|
||||||
|
|
||||||
// WARNING: THE EXOPLAYER VERSION MUST BE KEPT IN LOCK-STEP WITH THE CUSTOM EXTRACTOR AND FLAC
|
|
||||||
// EXTENSION BLOBS. IF NOT, VERY UNFRIENDLY BUILD FAILURES AND CRASHES MAY ENSUE.
|
|
||||||
def exoplayer_version = "2.16.1"
|
|
||||||
implementation("com.google.android.exoplayer:exoplayer-core:$exoplayer_version") {
|
|
||||||
exclude group: "com.google.android.exoplayer", module: "exoplayer-extractor"
|
|
||||||
}
|
|
||||||
|
|
||||||
implementation fileTree(dir: "libs", include: ["extension-*.aar"])
|
|
||||||
implementation fileTree(dir: "libs", include: ["library-*.aar"])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task ktlint(type: JavaExec, group: "verification") {
|
task ktlint(type: JavaExec, group: "verification") {
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,5 @@ android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
# Kotlin code style for this project: "official" or "obsolete":
|
# Kotlin code style for this project: "official" or "obsolete":
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
# Stop ExoPlayer from mangling AAR libraries with default abstract methods
|
||||||
|
android.enableDexingArtifactTransform=false
|
||||||
|
|
@ -31,10 +31,10 @@ def sh(cmd):
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
start_path = os.path.join(os.path.abspath(os.curdir))
|
start_path = os.path.join(os.path.abspath(os.curdir))
|
||||||
libs_path = os.path.join(start_path, "app", "src", "libs")
|
libs_path = os.path.join(start_path, "app", "libs")
|
||||||
exoplayer_path = os.path.join(start_path, "app", "srclibs", "exoplayer")
|
exoplayer_path = os.path.join(start_path, "app", "build", "srclibs", "exoplayer")
|
||||||
|
|
||||||
if os.path.exists(exoplayer_path):
|
if os.path.exists(libs_path):
|
||||||
reinstall = input(INFO + "info:" + NC + " exoplayer is already installed. would you like to reinstall it? [y/n] ")
|
reinstall = input(INFO + "info:" + NC + " exoplayer is already installed. would you like to reinstall it? [y/n] ")
|
||||||
|
|
||||||
if not re.match("[yY][eE][sS]|[yY]", reinstall):
|
if not re.match("[yY][eE][sS]|[yY]", reinstall):
|
||||||
|
|
@ -99,6 +99,7 @@ os.chdir(exoplayer_path)
|
||||||
sh("./gradlew library-extractor:bundleReleaseAar")
|
sh("./gradlew library-extractor:bundleReleaseAar")
|
||||||
sh("./gradlew extension-flac:bundleReleaseAar")
|
sh("./gradlew extension-flac:bundleReleaseAar")
|
||||||
os.chdir(start_path)
|
os.chdir(start_path)
|
||||||
|
sh("mkdir " + libs_path)
|
||||||
sh("cp " + extractor_aar_path + " " + libs_path)
|
sh("cp " + extractor_aar_path + " " + libs_path)
|
||||||
sh("cp " + flac_ext_aar_path + " " + libs_path)
|
sh("cp " + flac_ext_aar_path + " " + libs_path)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue