mirror of
https://github.com/Michatec/michas-droid.git
synced 2026-05-30 18:02:43 +02:00
127 lines
3.1 KiB
Groovy
127 lines
3.1 KiB
Groovy
buildscript {
|
|
ext.versions = [
|
|
android: '3.4.1',
|
|
kotlin: '1.3.72'
|
|
]
|
|
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:' + versions.android
|
|
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:' + versions.kotlin
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
buildToolsVersion '29.0.3'
|
|
|
|
defaultConfig {
|
|
archivesBaseName = 'foxy-droid'
|
|
applicationId 'nya.kitsunyan.foxydroid'
|
|
minSdkVersion 21
|
|
targetSdkVersion 29
|
|
versionCode 1
|
|
versionName '1.0'
|
|
|
|
def languages = [ 'en' ]
|
|
buildConfigField 'String[]', 'LANGUAGES', '{ "' + languages.join('", "') + '" }'
|
|
resConfigs languages
|
|
}
|
|
|
|
sourceSets.all {
|
|
def javaDir = it.java.srcDirs.find { it.name == 'java' }
|
|
it.java.srcDirs += new File(javaDir.parentFile, 'kotlin')
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = compileOptions.sourceCompatibility.toString()
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
}
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
}
|
|
all {
|
|
crunchPngs false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro'
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
warning 'InvalidPackage'
|
|
ignore 'InvalidVectorPath'
|
|
}
|
|
|
|
packagingOptions {
|
|
exclude '/DebugProbesKt.bin'
|
|
exclude '/kotlin/**.kotlin_builtins'
|
|
exclude '/kotlin/**.kotlin_metadata'
|
|
exclude '/META-INF/**.kotlin_module'
|
|
exclude '/META-INF/**.pro'
|
|
exclude '/META-INF/**.version'
|
|
exclude '/okhttp3/internal/publicsuffix/*'
|
|
}
|
|
|
|
def keystorePropertiesFile = rootProject.file('keystore.properties')
|
|
if (keystorePropertiesFile.exists()) {
|
|
def keystoreProperties = new Properties()
|
|
keystoreProperties.load(keystorePropertiesFile.newDataInputStream())
|
|
|
|
def signing = [
|
|
storeFile: keystoreProperties['store.file'],
|
|
storePassword: keystoreProperties['store.password'],
|
|
keyAlias: keystoreProperties['key.alias'],
|
|
keyPassword: keystoreProperties['key.password']
|
|
]
|
|
|
|
if (!signing.any { _, v -> v == null }) {
|
|
signingConfigs {
|
|
primary {
|
|
storeFile file(signing.storeFile)
|
|
storePassword signing.storePassword
|
|
keyAlias signing.keyAlias
|
|
keyPassword signing.keyPassword
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug.signingConfig signingConfigs.primary
|
|
release.signingConfig signingConfigs.primary
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:' + versions.kotlin
|
|
implementation 'androidx.fragment:fragment:1.2.5'
|
|
implementation 'androidx.viewpager2:viewpager2:1.0.0'
|
|
implementation 'com.squareup.okhttp3:okhttp:4.7.2'
|
|
implementation 'io.reactivex.rxjava3:rxjava:3.0.4'
|
|
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
|
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.11.0'
|
|
implementation 'com.squareup.picasso:picasso:2.71828'
|
|
}
|