mirror of
https://github.com/dgis/emu48android
synced 2024-12-26 09:58:49 +01:00
bc8bd5b821
- Updated source code from Eric Rechlin's Emu48 version 1.64+ that was merged from Christoph Gießelink's Emu48 version 1.65. This new version improve the serial communication.
95 lines
3.4 KiB
Groovy
95 lines
3.4 KiB
Groovy
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 the folder app/build/outputs/apk/release/")
|
|
|
|
// 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 32
|
|
defaultConfig {
|
|
applicationId "org.emulator.forty.eight"
|
|
minSdkVersion 19
|
|
targetSdkVersion 32
|
|
versionCode 25
|
|
versionName "2.6"
|
|
setProperty("archivesBaseName", "Emu48-v$versionName")
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
externalNativeBuild {
|
|
cmake {
|
|
//abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
|
|
//abiFilters 'x86_64'
|
|
//version "3.10.2"
|
|
}
|
|
}
|
|
}
|
|
|
|
if (canSign) {
|
|
signingConfigs {
|
|
release {
|
|
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
|
|
}
|
|
|
|
ndk {
|
|
debugSymbolLevel 'FULL' // { SYMBOL_TABLE | FULL }
|
|
}
|
|
}
|
|
}
|
|
externalNativeBuild {
|
|
cmake {
|
|
path "CMakeLists.txt"
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = '1.8'
|
|
targetCompatibility = '1.8'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation 'androidx.appcompat:appcompat:1.4.2'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation 'androidx.preference:preference:1.2.0'
|
|
implementation 'com.google.android.material:material:1.6.1'
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test:runner:1.4.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
|
}
|