mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
126 lines
3.5 KiB
Groovy
126 lines
3.5 KiB
Groovy
buildscript {
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.0.2'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace 'org.futo.inputmethod.latin'
|
|
|
|
compileSdk 33
|
|
|
|
// Required if using classes in android.test.runner
|
|
useLibrary 'android.test.runner'
|
|
|
|
// Required if using classes in android.test.base
|
|
useLibrary 'android.test.base'
|
|
|
|
// Required if using classes in android.test.mock
|
|
useLibrary 'android.test.mock'
|
|
|
|
defaultConfig {
|
|
minSdk 24
|
|
targetSdk 33
|
|
versionName "1.0"
|
|
|
|
applicationId 'org.futo.inputmethod.latin'
|
|
testApplicationId 'org.futo.inputmethod.latin.tests'
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables.useSupportLibrary = false
|
|
}
|
|
|
|
signingConfigs {
|
|
debug {
|
|
storeFile file("java/shared.keystore")
|
|
}
|
|
}
|
|
|
|
final def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
def releaseSigning = signingConfigs.debug
|
|
if (keystorePropertiesFile.exists()) {
|
|
final def keystoreProperties = new Properties()
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
releaseSigning = signingConfigs.create("release") {
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile rootProject.file(keystoreProperties['storeFile'])
|
|
storePassword keystoreProperties['storePassword']
|
|
}
|
|
} else {
|
|
project.logger.lifecycle('keystore.properties not found, APK may not be signed')
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
minifyEnabled false
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
release {
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags'
|
|
signingConfig releaseSigning
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
flavorDimensions "default"
|
|
|
|
sourceSets {
|
|
main {
|
|
res.srcDirs = ['java/res']
|
|
java.srcDirs = ['common/src', 'java/src']
|
|
manifest.srcFile 'java/AndroidManifest.xml'
|
|
}
|
|
|
|
androidTest {
|
|
res.srcDirs = ['tests/res']
|
|
java.srcDirs = ['tests/src']
|
|
manifest.srcFile "tests/AndroidManifest.xml"
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
}
|
|
|
|
aaptOptions {
|
|
noCompress 'dict'
|
|
}
|
|
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
path 'native/jni/Android.mk'
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven { url "../../../prebuilts/fullsdk-darwin/extras/android/m2repository" }
|
|
maven { url "../../../prebuilts/fullsdk-linux/extras/android/m2repository" }
|
|
mavenCentral()
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'androidx.legacy:legacy-support-v4:+'
|
|
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation "org.mockito:mockito-core:1.9.5"
|
|
androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
|
|
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
|
androidTestImplementation 'androidx.test:rules:1.1.1'
|
|
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
|
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
|
|
}
|