emu48android-linux/app/build.gradle

89 lines
3.3 KiB
Groovy
Raw Normal View History

apply plugin: 'com.android.application'
// Create a variable called keystorePropertiesFile, and initialize it to your
// keystore.properties file, in the rootProject folder.
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
def canSign = false
if(keystorePropertiesFile.exists()) {
canSign = true
println("The release flavor will signed in app/build/outputs/apk/release/app-release.apk")
// Load your keystore.properties file into the keystoreProperties object.
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} else {
println("""
The keystore.properties file is not found, so, you will not be able to install an unsigned APK in an Android device.
Please, in the root folder, create a keystore.jks file with the command:
keytool -genkey -keystore ./keystore.jks -keyalg RSA -validity 9125 -alias key0
and create the file ./keystore.properties , with the following properties:
storeFile=../keystore.jks
storePassword=myPassword
keyAlias=key0
keyPassword=myPassword
""")
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "org.emulator.forty.eight"
minSdkVersion 19
targetSdkVersion 28
versionCode 4
versionName "1.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
2019-01-02 00:08:17 +01:00
//abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
2019-01-02 22:04:53 +01:00
//abiFilters 'x86_64'
2019-02-10 23:56:04 +01:00
version "3.10.2"
}
}
}
// if(project.hasProperty("MyProject.properties")
// && new File(project.property("MyProject.properties")).exists()) {
if(canSign) {
signingConfigs {
release {
// storeFile new File(keystoreProperties['storeFile'])
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
v1SigningEnabled true
v2SigningEnabled false
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if(canSign) {
signingConfig signingConfigs.release
}
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'com.google.android.material:material:1.1.0-alpha04'
2018-12-20 00:12:25 +01:00
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
}