SubwayTooter-Android-App/app/build.gradle

189 lines
6.4 KiB
Groovy

import java.text.SimpleDateFormat
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
// apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion target_sdk_version
// exoPlayer 2.9.0 以降は Java 8 compiler support を要求する
// https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md
// Invoke-customs are only supported starting with Android O (--min-api 26)
// Default interface methods are only supported starting with Android N (--min-api 24)
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
targetSdkVersion target_sdk_version
minSdkVersion min_sdk_version
versionCode 386
versionName "3.8.6"
applicationId "jp.juggler.subwaytooter"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// https://stackoverflow.com/questions/47791227/java-lang-illegalstateexception-dex-archives-setting-dex-extension-only-for
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
}
}
}
// Specifies comma-separated list of flavor dimensions.
flavorDimensions "rcOrDev"
productFlavors {
rc {
dimension "rcOrDev"
}
}
dexOptions {
jumboMode = true
preDexLibraries true
maxProcessCount 10
javaMaxHeapSize "3g"
}
// Generate Signed APK のファイル名を変更
android.applicationVariants.all { variant ->
if (variant.buildType.name == "release") {
variant.outputs.all {
// Rename APK
def versionCode = defaultConfig.versionCode
def versionName = defaultConfig.versionName
def flavor = variant.flavorName
def date = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date())
outputFileName = "../../SubwayTooter-${flavor}-${versionCode}-${versionName}-${date}.apk"
}
}
}
packagingOptions {
// https://github.com/Kotlin/kotlinx.coroutines/issues/1064
pickFirst("META-INF/atomicfu.kotlin_module")
}
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
}
kapt {
useBuildCache = true
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha4', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation project(':exif')
implementation project(':colorpicker')
implementation project(':emoji')
implementation project(':apng_android')
implementation "androidx.appcompat:appcompat:$appcompat_version"
// DrawerLayout
implementation "androidx.drawerlayout:drawerlayout:1.1.0-alpha03"
// NavigationView
implementation "com.google.android.material:material:1.1.0-beta01"
// PreferenceManager
implementation "androidx.preference:preference-ktx:1.1.0"
// CustomTabs
implementation "androidx.browser:browser:1.0.0"
// Recyclerview
implementation "androidx.recyclerview:recyclerview:1.1.0-beta04"
kapt 'androidx.annotation:annotation:1.1.0'
// https://firebase.google.com/support/release-notes/android
implementation "com.google.firebase:firebase-core:17.2.0"
implementation "com.google.firebase:firebase-messaging:20.0.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinx_coroutines_version"
// Anko Layouts
// sdk15, sdk19, sdk21, sdk23 are also available
implementation "org.jetbrains.anko:anko-sdk25:$anko_version"
implementation "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
// Coroutine listeners for Anko Layouts
//implementation "org.jetbrains.anko:anko-sdk25-coroutines:$anko_version"
//implementation "org.jetbrains.anko:anko-appcompat-v7-coroutines:$anko_version"
testImplementation 'junit:junit:4.12' // しばらくはkotlin-testとjunitを併用
implementation 'com.squareup.okhttp3:okhttp:4.1.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.1.0'
testImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
def glide_version = '4.9.0'
implementation "com.github.bumptech.glide:glide:$glide_version"
implementation "com.github.bumptech.glide:annotations:$glide_version"
implementation( "com.github.bumptech.glide:okhttp3-integration:$glide_version"){
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
// 推移的な依存関係の除外
// glide 4.9.0 は okhttp3 3.9.1を使ってる
// http://bumptech.github.io/glide/int/about.html#how-do-i-use-a-specific-version-of-okhttp-volley-or-other-third-party-library
}
kapt "com.github.bumptech.glide:compiler:$glide_version"
implementation "org.conscrypt:conscrypt-android:2.2.1"
implementation 'io.github.inflationx:calligraphy3:3.1.1'
implementation 'io.github.inflationx:viewpump:2.0.3'
implementation 'com.github.woxthebox:draglistview:1.6.6'
implementation 'com.github.omadahealth:swipy:1.2.3@aar'
implementation 'com.github.kenglxn.QRGen:android:2.5.0'
implementation 'commons-io:commons-io:2.6'
implementation 'org.hjson:hjson:3.0.0'
implementation 'com.google.android:flexbox:1.1.0' // 1.1.0 から AndroidX 依存
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
implementation 'com.google.android.exoplayer:exoplayer:2.10.4'
implementation 'me.drakeet.support:toastcompat:1.0.2'
implementation 'com.caverock:androidsvg-aar:1.4'
}
repositories {
mavenCentral()
}
apply plugin: 'com.google.gms.google-services'