mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-14 21:49:37 +00:00
57 lines
1.5 KiB
Groovy
57 lines
1.5 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "org.mozilla.rust-android-gradle.rust-android"
|
|
}
|
|
|
|
android {
|
|
namespace "rs.tts"
|
|
compileSdkVersion 33
|
|
ndkVersion "25.1.8937393"
|
|
defaultConfig {
|
|
applicationId "rs.tts"
|
|
minSdkVersion 21
|
|
targetSdkVersion 33
|
|
versionCode 1
|
|
versionName "1.0"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation "androidx.core:core-ktx:1.2.0"
|
|
implementation "androidx.annotation:annotation:1.1.0"
|
|
implementation "com.google.android.material:material:1.1.0"
|
|
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
|
|
}
|
|
|
|
apply plugin: "org.mozilla.rust-android-gradle.rust-android"
|
|
|
|
cargo {
|
|
module = "."
|
|
libname = "tts"
|
|
targets = ["arm", "x86"]
|
|
}
|
|
|
|
tasks.whenTaskAdded { task ->
|
|
if ((task.name == 'javaPreCompileDebug' || task.name == 'javaPreCompileRelease')) {
|
|
task.dependsOn "cargoBuild"
|
|
}
|
|
}
|
|
|
|
project.afterEvaluate {
|
|
android.applicationVariants.all { variant ->
|
|
task "run${variant.name.capitalize()}"(type: Exec, dependsOn: "install${variant.name.capitalize()}", group: "run") {
|
|
commandLine = ["adb", "shell", "monkey", "-p", variant.applicationId + " 1"]
|
|
doLast {
|
|
println "Launching ${variant.applicationId}"
|
|
}
|
|
}
|
|
}
|
|
}
|