2018-11-12 23:31:04 +01:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
2019-03-15 20:42:54 +01:00
|
|
|
// 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
|
2019-06-14 08:45:26 +02:00
|
|
|
if (keystorePropertiesFile.exists()) {
|
2019-03-15 20:42:54 +01:00
|
|
|
canSign = true
|
2019-03-20 19:06:36 +01:00
|
|
|
println("The release flavor will signed in the folder app/build/outputs/apk/release/")
|
2019-03-15 20:42:54 +01:00
|
|
|
|
|
|
|
// 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
|
|
|
|
""")
|
|
|
|
}
|
|
|
|
|
2018-11-12 23:31:04 +01:00
|
|
|
android {
|
|
|
|
compileSdkVersion 28
|
|
|
|
defaultConfig {
|
2019-01-17 21:13:46 +01:00
|
|
|
applicationId "org.emulator.forty.eight"
|
2019-03-09 00:07:10 +01:00
|
|
|
minSdkVersion 19
|
2018-11-12 23:31:04 +01:00
|
|
|
targetSdkVersion 28
|
2019-12-12 23:58:58 +01:00
|
|
|
versionCode 11
|
2019-10-22 23:39:01 +02:00
|
|
|
versionName "1.7"
|
2019-03-20 19:06:36 +01:00
|
|
|
setProperty("archivesBaseName", "Emu48-v$versionName")
|
2018-12-07 23:57:35 +01:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-11-12 23:31:04 +01:00
|
|
|
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-05-02 23:57:15 +02:00
|
|
|
//version "3.10.2"
|
2018-11-12 23:31:04 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-03-15 20:42:54 +01:00
|
|
|
|
2019-06-14 08:45:26 +02:00
|
|
|
if (canSign) {
|
2019-03-15 20:42:54 +01:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
storeFile file(keystoreProperties['storeFile'])
|
|
|
|
storePassword keystoreProperties['storePassword']
|
|
|
|
keyAlias keystoreProperties['keyAlias']
|
|
|
|
keyPassword keystoreProperties['keyPassword']
|
|
|
|
v1SigningEnabled true
|
|
|
|
v2SigningEnabled false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-11-12 23:31:04 +01:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2019-06-14 08:45:26 +02:00
|
|
|
if (canSign) {
|
2019-03-15 20:42:54 +01:00
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
2018-11-12 23:31:04 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path "CMakeLists.txt"
|
|
|
|
}
|
|
|
|
}
|
2019-07-13 16:29:34 +02:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = '1.8'
|
|
|
|
targetCompatibility = '1.8'
|
|
|
|
}
|
2018-11-12 23:31:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2019-12-04 00:03:58 +01:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3'
|
|
|
|
implementation 'androidx.preference:preference:1.1.0'
|
|
|
|
implementation 'com.google.android.material:material:1.2.0-alpha02'
|
2019-06-14 08:45:26 +02:00
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
2019-06-14 19:55:40 +02:00
|
|
|
implementation 'androidx.viewpager:viewpager:1.0.0'
|
2019-12-04 00:03:58 +01:00
|
|
|
testImplementation 'junit:junit:4.13-beta-3'
|
|
|
|
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
|
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
|
2018-11-12 23:31:04 +01:00
|
|
|
}
|