mirror of
https://github.com/etlegacy/etlegacy-android.git
synced 2024-11-13 00:04:12 +00:00
67 lines
1.8 KiB
Groovy
67 lines
1.8 KiB
Groovy
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
|
|
def buildAsApplication = !buildAsLibrary
|
|
if (buildAsApplication) {
|
|
apply plugin: 'com.etlegacy.application'
|
|
}
|
|
else {
|
|
apply plugin: 'com.etlegacy.library'
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 26
|
|
defaultConfig {
|
|
if (buildAsApplication) {
|
|
applicationId "org.etlegacy.app"
|
|
}
|
|
minSdkVersion 14
|
|
targetSdkVersion 26
|
|
versionCode 1
|
|
versionName "1.0"
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments "-DCROSS_COMPILE32=OFF"
|
|
}
|
|
}
|
|
ndk {
|
|
// Specifies the ABI configurations of your native
|
|
// libraries Gradle should build and package with your APK.
|
|
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 '/home/rafal/Pulpit/etlegacy/CMakeLists.txt'
|
|
}
|
|
}
|
|
|
|
}
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
if (buildAsLibrary) {
|
|
libraryVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
def outputFile = output.outputFile
|
|
if (outputFile != null && outputFile.name.endsWith(".aar")) {
|
|
def fileName = "org.etlegacy.app.aar";
|
|
output.outputFile = new File(outputFile.parent, fileName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
}
|