1- apply plugin : ' com.android.application'
1+ plugins {
2+ id ' com.android.application'
3+ }
24
35android {
46 compileSdkVersion rootProject. ext. compileSdkVersion
@@ -13,6 +15,14 @@ android {
1315 ndk {
1416 abiFilters rootProject. ext. abiFilters. split(" ," )
1517 }
18+ externalNativeBuild {
19+ cmake {
20+ abiFilters rootProject. ext. abiFilters. split(" ," )
21+ if (rootProject. ext. dependencyOnLocalLibrary) {
22+ arguments " -DDEPENDENCY_ON_LOCAL_LIBRARY=ON"
23+ }
24+ }
25+ }
1626 }
1727 externalNativeBuild {
1828 cmake {
@@ -35,31 +45,28 @@ android {
3545 minifyEnabled false
3646 }
3747 }
38- buildFeatures {
39- prefab true
48+ if (! rootProject. ext. dependencyOnLocalLibrary) {
49+ buildFeatures {
50+ prefab true
51+ }
4052 }
4153 packagingOptions {
4254 pickFirst ' **/libxdl.so'
4355 }
56+ lintOptions {
57+ abortOnError false
58+ }
4459}
4560
4661dependencies {
47- implementation ' androidx.appcompat:appcompat:1.3.0 '
48- implementation ' com.google.android.material:material:1.3 .0'
62+ implementation ' androidx.appcompat:appcompat:1.3.1 '
63+ implementation ' com.google.android.material:material:1.4 .0'
4964 implementation ' androidx.constraintlayout:constraintlayout:2.0.4'
5065
51- implementation project(' :xdl' )
52- // implementation 'io.hexhacking:xdl:1.1.1'
53- }
54-
55- // Bypass the compatibility issue between prefab and gradle-project-dependencies.
56- // Note: This is not required for gradle-maven-dependencies.
57- tasks. whenTaskAdded { task ->
58- if (task. name == ' generateJsonModelDebug' ) {
59- task. dependsOn(' :xdl:prefabDebugPackage' )
60- }
61- else if (task. name == ' generateJsonModelRelease' ) {
62- task. dependsOn(' :xdl:prefabReleasePackage' )
66+ if (rootProject. ext. dependencyOnLocalLibrary) {
67+ implementation project(' :xdl' )
68+ } else {
69+ implementation ' io.hexhacking:xdl:1.1.1'
6370 }
6471}
6572
0 commit comments