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 {
|
2023-06-24 23:32:55 +02:00
|
|
|
namespace 'org.emulator.forty.eight'
|
2024-06-10 08:27:31 +02:00
|
|
|
compileSdk 34
|
2018-11-12 23:31:04 +01:00
|
|
|
defaultConfig {
|
2019-01-17 21:13:46 +01:00
|
|
|
applicationId "org.emulator.forty.eight"
|
2024-06-10 08:27:31 +02:00
|
|
|
minSdk 21
|
2024-06-12 13:07:28 +02:00
|
|
|
targetSdk 34
|
2024-10-29 16:03:09 +01:00
|
|
|
versionCode 27
|
|
|
|
versionName "2.8"
|
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"
|
2024-06-12 13:07:28 +02:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
cppFlags '-std=c++11 -fpermissive -Wno-error=incompatible-pointer-types'
|
|
|
|
}
|
|
|
|
}
|
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
|
|
|
|
}
|
2020-12-09 12:20:50 +01:00
|
|
|
|
|
|
|
ndk {
|
|
|
|
debugSymbolLevel 'FULL' // { SYMBOL_TABLE | FULL }
|
|
|
|
}
|
2018-11-12 23:31:04 +01:00
|
|
|
}
|
|
|
|
}
|
2023-06-24 23:32:55 +02:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
|
|
}
|
2018-11-12 23:31:04 +01:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2023-06-24 23:32:55 +02:00
|
|
|
path file('CMakeLists.txt')
|
2018-11-12 23:31:04 +01:00
|
|
|
}
|
|
|
|
}
|
2024-06-12 13:07:28 +02:00
|
|
|
ndkVersion '25.1.8937393'
|
2018-11-12 23:31:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2024-06-10 08:27:31 +02:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
2022-08-19 17:18:15 +02:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2024-06-10 08:27:31 +02:00
|
|
|
implementation 'com.google.android.material:material:1.12.0'
|
|
|
|
implementation 'androidx.preference:preference:1.2.1'
|
2020-05-10 01:09:46 +02:00
|
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
2022-03-03 08:11:19 +01:00
|
|
|
testImplementation 'junit:junit:4.13.2'
|
2024-10-29 16:03:09 +01:00
|
|
|
androidTestImplementation 'androidx.test:runner:1.6.2'
|
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
2018-11-12 23:31:04 +01:00
|
|
|
}
|