d1bf01d562
Also some typos and reformatting parts of the code Former-commit-id: 0f1de44fab44a09c49d08421a3c2032123d3023b Former-commit-id: 810b6b1bce1f7feeee7c33bec5ff16915367db17
60 lines
2.1 KiB
Groovy
60 lines
2.1 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
buildToolsVersion "29.0.3"
|
|
defaultConfig {
|
|
applicationId "com.mrmichel.rustdroid_emu"
|
|
minSdkVersion 21
|
|
targetSdkVersion 23
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
}
|
|
|
|
apply plugin: 'org.mozilla.rust-android-gradle.rust-android'
|
|
|
|
cargo {
|
|
prebuiltToolchains = true
|
|
verbose = true
|
|
profile = 'release'
|
|
module = "../../../bindings/rustboyadvance-jni"
|
|
targetDirectory = '../../../target'
|
|
libname = "rustboyadvance_jni"
|
|
targets = ['x86', 'arm64']
|
|
apiLevel = 21
|
|
}
|
|
|
|
afterEvaluate {
|
|
// The `cargoBuild` task isn't available until after evaluation.
|
|
android.applicationVariants.all { variant ->
|
|
def productFlavor = ""
|
|
variant.productFlavors.each {
|
|
productFlavor += "${it.name.capitalize()}"
|
|
}
|
|
def buildType = "${variant.buildType.name.capitalize()}"
|
|
tasks["generate${productFlavor}${buildType}Assets"].dependsOn(tasks["cargoBuild"])
|
|
}
|
|
}
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation 'androidx.appcompat:appcompat:1.0.2'
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
|
implementation 'com.google.android.material:material:1.1.0'
|
|
implementation "androidx.documentfile:documentfile:1.0.1"
|
|
implementation 'androidx.preference:preference:1.1.0'
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
implementation 'commons-io:commons-io:2.6'
|
|
testImplementation 'junit:junit:4.12'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
|
}
|