You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.7 KiB
64 lines
1.7 KiB
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY'); |
|
def buildAsApplication = !buildAsLibrary |
|
if (buildAsApplication) { |
|
apply plugin: 'com.android.application' |
|
} |
|
else { |
|
apply plugin: 'com.android.library' |
|
} |
|
|
|
android { |
|
compileSdkVersion 29 |
|
aaptOptions { |
|
noCompress 'mpq' |
|
} |
|
defaultConfig { |
|
if (buildAsApplication) { |
|
applicationId "org.diasurgical.devilutionx" |
|
} |
|
minSdkVersion 21 |
|
targetSdkVersion 29 |
|
versionCode 18 |
|
versionName "1.2.1" |
|
externalNativeBuild { |
|
cmake { |
|
arguments "-DANDROID_STL=c++_static" |
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' |
|
} |
|
} |
|
} |
|
buildTypes { |
|
release { |
|
minifyEnabled false |
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
|
} |
|
} |
|
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) { |
|
sourceSets.main { |
|
jniLibs.srcDir 'libs' |
|
} |
|
externalNativeBuild { |
|
cmake { |
|
path '../../CMakeLists.txt' |
|
version "3.13.0+" |
|
} |
|
} |
|
|
|
} |
|
|
|
if (buildAsLibrary) { |
|
libraryVariants.all { variant -> |
|
variant.outputs.each { output -> |
|
def outputFile = output.outputFile |
|
if (outputFile != null && outputFile.name.endsWith(".aar")) { |
|
def fileName = "org.diasurgical.devilutionx.aar"; |
|
output.outputFile = new File(outputFile.parent, fileName); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
dependencies { |
|
implementation fileTree(include: ['*.jar'], dir: 'libs') |
|
}
|
|
|