2017-04-23 07:42:09 +02:00
|
|
|
import java.text.SimpleDateFormat
|
|
|
|
|
2017-04-20 18:23:59 +02:00
|
|
|
apply plugin: 'com.android.application'
|
2017-11-04 15:51:15 +01:00
|
|
|
apply plugin: 'kotlin-android'
|
2019-01-25 15:38:21 +01:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2018-01-19 10:37:04 +01:00
|
|
|
// apply plugin: 'kotlin-android-extensions'
|
2017-04-20 18:23:59 +02:00
|
|
|
|
|
|
|
android {
|
2018-10-01 11:45:51 +02:00
|
|
|
|
2018-09-12 07:55:15 +02:00
|
|
|
compileSdkVersion target_sdk_version
|
|
|
|
|
2019-07-31 20:30:56 +02:00
|
|
|
// exoPlayer 2.9.0 以降は Java 8 compiler support を要求する
|
2019-07-12 06:38:19 +02:00
|
|
|
// 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
|
|
|
|
}
|
|
|
|
|
2017-04-20 18:23:59 +02:00
|
|
|
defaultConfig {
|
2018-09-12 07:55:15 +02:00
|
|
|
targetSdkVersion target_sdk_version
|
|
|
|
minSdkVersion min_sdk_version
|
2018-01-14 22:47:42 +01:00
|
|
|
|
2019-10-09 00:51:44 +02:00
|
|
|
versionCode 385
|
|
|
|
versionName "3.8.5"
|
2018-09-12 07:55:15 +02:00
|
|
|
applicationId "jp.juggler.subwaytooter"
|
2019-02-15 02:51:22 +01:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-01-04 19:52:25 +01:00
|
|
|
|
|
|
|
// https://stackoverflow.com/questions/47791227/java-lang-illegalstateexception-dex-archives-setting-dex-extension-only-for
|
|
|
|
multiDexEnabled true
|
2017-04-20 18:23:59 +02:00
|
|
|
}
|
2017-04-25 16:47:27 +02:00
|
|
|
|
2017-04-20 18:23:59 +02:00
|
|
|
buildTypes {
|
|
|
|
release {
|
2019-02-15 04:17:31 +01:00
|
|
|
minifyEnabled false
|
2018-01-13 07:52:07 +01:00
|
|
|
shrinkResources false
|
2017-04-20 18:23:59 +02:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2018-08-31 15:22:51 +02:00
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
disable 'MissingTranslation'
|
|
|
|
}
|
2017-04-20 18:23:59 +02:00
|
|
|
}
|
|
|
|
}
|
2017-04-25 16:47:27 +02:00
|
|
|
|
2017-11-04 15:51:15 +01:00
|
|
|
// Specifies comma-separated list of flavor dimensions.
|
|
|
|
flavorDimensions "rcOrDev"
|
|
|
|
|
2017-04-23 07:42:09 +02:00
|
|
|
productFlavors {
|
|
|
|
rc {
|
2017-11-04 15:51:15 +01:00
|
|
|
dimension "rcOrDev"
|
2017-04-23 07:42:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-04 15:51:15 +01:00
|
|
|
dexOptions {
|
|
|
|
jumboMode = true
|
2019-08-19 12:26:05 +02:00
|
|
|
preDexLibraries true
|
|
|
|
maxProcessCount 10
|
|
|
|
javaMaxHeapSize "3g"
|
2017-11-04 15:51:15 +01:00
|
|
|
}
|
|
|
|
|
2017-04-23 07:42:09 +02:00
|
|
|
// Generate Signed APK のファイル名を変更
|
2017-11-04 15:51:15 +01:00
|
|
|
android.applicationVariants.all { variant ->
|
2017-04-23 07:42:09 +02:00
|
|
|
if (variant.buildType.name == "release") {
|
2017-11-04 15:51:15 +01:00
|
|
|
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"
|
2017-04-23 07:42:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-11-04 15:51:15 +01:00
|
|
|
|
2019-04-13 01:12:17 +02:00
|
|
|
packagingOptions {
|
|
|
|
// https://github.com/Kotlin/kotlinx.coroutines/issues/1064
|
|
|
|
pickFirst("META-INF/atomicfu.kotlin_module")
|
|
|
|
}
|
2019-08-30 06:02:08 +02:00
|
|
|
|
|
|
|
useLibrary 'android.test.base'
|
|
|
|
useLibrary 'android.test.mock'
|
2017-04-20 18:23:59 +02:00
|
|
|
}
|
|
|
|
|
2019-01-25 15:38:21 +01:00
|
|
|
kapt {
|
|
|
|
useBuildCache = true
|
|
|
|
}
|
|
|
|
|
2017-04-20 18:23:59 +02:00
|
|
|
dependencies {
|
2018-03-27 05:07:40 +02:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2019-02-15 02:51:22 +01:00
|
|
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha4', {
|
2017-04-20 18:23:59 +02:00
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
})
|
2017-12-11 22:18:17 +01:00
|
|
|
|
2018-01-28 20:03:04 +01:00
|
|
|
implementation project(':exif')
|
|
|
|
implementation project(':colorpicker')
|
|
|
|
implementation project(':emoji')
|
|
|
|
implementation project(':apng_android')
|
2018-01-04 19:52:25 +01:00
|
|
|
|
2019-02-15 02:51:22 +01:00
|
|
|
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
2019-09-12 17:13:00 +02:00
|
|
|
|
|
|
|
// DrawerLayout
|
2019-09-12 15:43:11 +02:00
|
|
|
implementation "androidx.drawerlayout:drawerlayout:1.1.0-alpha03"
|
2019-09-12 17:13:00 +02:00
|
|
|
|
|
|
|
// NavigationView
|
|
|
|
implementation "com.google.android.material:material:1.1.0-alpha10"
|
|
|
|
|
|
|
|
// PreferenceManager
|
2019-09-12 15:43:11 +02:00
|
|
|
implementation "androidx.preference:preference-ktx:1.1.0"
|
2019-09-12 17:13:00 +02:00
|
|
|
|
|
|
|
// CustomTabs
|
|
|
|
implementation "androidx.browser:browser:1.0.0"
|
|
|
|
|
2019-10-05 14:28:04 +02:00
|
|
|
// Recyclerview
|
|
|
|
implementation "androidx.recyclerview:recyclerview:1.1.0-beta04"
|
|
|
|
|
2019-08-24 12:56:05 +02:00
|
|
|
kapt 'androidx.annotation:annotation:1.1.0'
|
2017-12-11 22:18:17 +01:00
|
|
|
|
2018-06-11 02:33:01 +02:00
|
|
|
// https://firebase.google.com/support/release-notes/android
|
2019-09-12 15:43:11 +02:00
|
|
|
implementation "com.google.firebase:firebase-core:17.2.0"
|
2019-08-24 05:35:22 +02:00
|
|
|
implementation "com.google.firebase:firebase-messaging:20.0.0"
|
2017-08-24 13:44:06 +02:00
|
|
|
|
2019-07-12 06:38:19 +02:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
2018-03-27 05:07:40 +02:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
|
|
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
2019-08-24 12:56:05 +02:00
|
|
|
|
2018-09-14 18:36:05 +02:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
|
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinx_coroutines_version"
|
2018-01-12 10:01:25 +01:00
|
|
|
|
2018-04-05 22:47:25 +02:00
|
|
|
// Anko Layouts
|
2018-08-31 15:22:51 +02:00
|
|
|
// sdk15, sdk19, sdk21, sdk23 are also available
|
2018-09-27 16:21:37 +02:00
|
|
|
implementation "org.jetbrains.anko:anko-sdk25:$anko_version"
|
2018-04-05 22:47:25 +02:00
|
|
|
implementation "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
|
2017-05-19 01:20:42 +02:00
|
|
|
|
2018-04-05 22:47:25 +02:00
|
|
|
// Coroutine listeners for Anko Layouts
|
|
|
|
//implementation "org.jetbrains.anko:anko-sdk25-coroutines:$anko_version"
|
|
|
|
//implementation "org.jetbrains.anko:anko-appcompat-v7-coroutines:$anko_version"
|
2017-12-20 21:55:51 +01:00
|
|
|
|
2018-04-05 22:47:25 +02:00
|
|
|
testImplementation 'junit:junit:4.12' // しばらくはkotlin-testとjunitを併用
|
2017-12-22 04:12:32 +01:00
|
|
|
|
2019-08-24 05:35:22 +02:00
|
|
|
implementation 'com.squareup.okhttp3:okhttp:4.1.0'
|
|
|
|
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.1.0'
|
2019-01-15 15:47:08 +01:00
|
|
|
testImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
|
|
|
|
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
|
2017-05-26 05:48:06 +02:00
|
|
|
|
2019-08-24 12:56:05 +02:00
|
|
|
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"
|
|
|
|
|
2018-05-19 10:58:58 +02:00
|
|
|
|
2019-10-09 00:04:17 +02:00
|
|
|
implementation "org.conscrypt:conscrypt-android:2.2.1"
|
2017-07-26 13:40:55 +02:00
|
|
|
|
2019-07-12 06:38:19 +02:00
|
|
|
implementation 'io.github.inflationx:calligraphy3:3.1.1'
|
|
|
|
implementation 'io.github.inflationx:viewpump:2.0.3'
|
2017-09-25 17:10:05 +02:00
|
|
|
|
2019-07-12 06:38:19 +02:00
|
|
|
implementation 'com.github.woxthebox:draglistview:1.6.6'
|
2017-12-21 12:33:35 +01:00
|
|
|
|
2018-04-05 22:47:25 +02:00
|
|
|
implementation 'com.github.omadahealth:swipy:1.2.3@aar'
|
2017-12-21 12:33:35 +01:00
|
|
|
|
2019-07-12 06:38:19 +02:00
|
|
|
implementation 'com.github.kenglxn.QRGen:android:2.5.0'
|
2018-01-14 22:47:42 +01:00
|
|
|
|
2018-04-05 22:47:25 +02:00
|
|
|
implementation 'commons-io:commons-io:2.6'
|
2018-01-14 22:47:42 +01:00
|
|
|
|
2018-04-05 22:47:25 +02:00
|
|
|
implementation 'org.hjson:hjson:3.0.0'
|
|
|
|
|
2019-02-15 02:51:22 +01:00
|
|
|
implementation 'com.google.android:flexbox:1.1.0' // 1.1.0 から AndroidX 依存
|
2018-04-05 22:47:25 +02:00
|
|
|
|
|
|
|
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
|
2018-01-17 18:39:16 +01:00
|
|
|
|
2019-09-12 15:43:11 +02:00
|
|
|
implementation 'com.google.android.exoplayer:exoplayer:2.10.4'
|
2018-01-21 13:46:36 +01:00
|
|
|
|
|
|
|
implementation 'me.drakeet.support:toastcompat:1.0.2'
|
2019-03-20 05:35:07 +01:00
|
|
|
|
2019-07-12 06:38:19 +02:00
|
|
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
2017-04-20 18:23:59 +02:00
|
|
|
}
|
2017-05-24 11:20:56 +02:00
|
|
|
|
2017-11-04 15:51:15 +01:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
2017-12-22 13:59:52 +01:00
|
|
|
|
2018-09-12 07:55:15 +02:00
|
|
|
apply plugin: 'com.google.gms.google-services'
|
2019-01-29 02:56:24 +01:00
|
|
|
|