2017-04-23 14:42:09 +09:00
|
|
|
import java.text.SimpleDateFormat
|
|
|
|
|
2017-04-21 01:23:59 +09:00
|
|
|
apply plugin: 'com.android.application'
|
2017-11-04 23:51:15 +09:00
|
|
|
apply plugin: 'kotlin-android'
|
2019-01-25 23:38:21 +09:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2017-04-21 01:23:59 +09:00
|
|
|
|
|
|
|
android {
|
2018-10-01 18:45:51 +09:00
|
|
|
|
2018-09-12 14:55:15 +09:00
|
|
|
compileSdkVersion target_sdk_version
|
|
|
|
|
2019-08-01 03:30:56 +09:00
|
|
|
// exoPlayer 2.9.0 以降は Java 8 compiler support を要求する
|
2019-07-12 13:38:19 +09: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 {
|
2020-09-09 05:17:32 +09:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
2019-07-12 13:38:19 +09:00
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
2017-04-21 01:23:59 +09:00
|
|
|
defaultConfig {
|
2018-09-12 14:55:15 +09:00
|
|
|
targetSdkVersion target_sdk_version
|
|
|
|
minSdkVersion min_sdk_version
|
2018-01-15 06:47:42 +09:00
|
|
|
|
2021-02-05 09:25:10 +09:00
|
|
|
versionCode 446
|
|
|
|
versionName "4.4.6"
|
2018-09-12 14:55:15 +09:00
|
|
|
applicationId "jp.juggler.subwaytooter"
|
2019-02-15 10:51:22 +09:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2017-04-21 01:23:59 +09:00
|
|
|
}
|
2017-04-25 23:47:27 +09:00
|
|
|
|
2017-04-21 01:23:59 +09:00
|
|
|
buildTypes {
|
|
|
|
release {
|
2019-02-15 12:17:31 +09:00
|
|
|
minifyEnabled false
|
2018-01-13 15:52:07 +09:00
|
|
|
shrinkResources false
|
2017-04-21 01:23:59 +09:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2018-08-31 22:22:51 +09:00
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
disable 'MissingTranslation'
|
|
|
|
}
|
2017-04-21 01:23:59 +09:00
|
|
|
}
|
|
|
|
}
|
2017-04-25 23:47:27 +09:00
|
|
|
|
2017-11-04 23:51:15 +09:00
|
|
|
// Specifies comma-separated list of flavor dimensions.
|
|
|
|
flavorDimensions "rcOrDev"
|
|
|
|
|
2017-04-23 14:42:09 +09:00
|
|
|
productFlavors {
|
|
|
|
rc {
|
2017-11-04 23:51:15 +09:00
|
|
|
dimension "rcOrDev"
|
2017-04-23 14:42:09 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-04 23:51:15 +09:00
|
|
|
dexOptions {
|
|
|
|
jumboMode = true
|
2019-08-19 19:26:05 +09:00
|
|
|
preDexLibraries true
|
|
|
|
maxProcessCount 10
|
|
|
|
javaMaxHeapSize "3g"
|
2017-11-04 23:51:15 +09:00
|
|
|
}
|
|
|
|
|
2017-04-23 14:42:09 +09:00
|
|
|
// Generate Signed APK のファイル名を変更
|
2017-11-04 23:51:15 +09:00
|
|
|
android.applicationVariants.all { variant ->
|
2017-04-23 14:42:09 +09:00
|
|
|
if (variant.buildType.name == "release") {
|
2017-11-04 23:51:15 +09: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 14:42:09 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-11-04 23:51:15 +09:00
|
|
|
|
2019-04-13 08:12:17 +09:00
|
|
|
packagingOptions {
|
|
|
|
// https://github.com/Kotlin/kotlinx.coroutines/issues/1064
|
|
|
|
pickFirst("META-INF/atomicfu.kotlin_module")
|
|
|
|
}
|
2019-08-30 13:02:08 +09:00
|
|
|
|
|
|
|
useLibrary 'android.test.base'
|
|
|
|
useLibrary 'android.test.mock'
|
2017-04-21 01:23:59 +09:00
|
|
|
}
|
|
|
|
|
2019-01-25 23:38:21 +09:00
|
|
|
kapt {
|
|
|
|
useBuildCache = true
|
|
|
|
}
|
|
|
|
|
2017-04-21 01:23:59 +09:00
|
|
|
dependencies {
|
2018-03-27 12:07:40 +09:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2019-02-15 10:51:22 +09:00
|
|
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha4', {
|
2017-04-21 01:23:59 +09:00
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
})
|
2017-12-12 06:18:17 +09:00
|
|
|
|
2020-08-25 09:04:18 +09:00
|
|
|
// implementation project(':exif')
|
2018-01-29 04:03:04 +09:00
|
|
|
implementation project(':colorpicker')
|
|
|
|
implementation project(':emoji')
|
|
|
|
implementation project(':apng_android')
|
2018-01-05 03:52:25 +09:00
|
|
|
|
2020-08-25 09:04:18 +09:00
|
|
|
|
2019-02-15 10:51:22 +09:00
|
|
|
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
2019-09-13 00:13:00 +09:00
|
|
|
|
|
|
|
// DrawerLayout
|
2020-09-09 05:17:32 +09:00
|
|
|
implementation "androidx.drawerlayout:drawerlayout:1.1.1"
|
2019-09-13 00:13:00 +09:00
|
|
|
|
|
|
|
// NavigationView
|
2020-09-09 05:17:32 +09:00
|
|
|
implementation "com.google.android.material:material:1.2.1"
|
2019-09-13 00:13:00 +09:00
|
|
|
|
|
|
|
// PreferenceManager
|
Android Studio 4.0.0, Android gradple plugin 4.0.1, Gradle 6.1.1, kotlin 1.4.0, espresso-core:3.3.0-rc03, androidx.test:runner:1.3.0-rc03, androidx.appcompat 1.2.0, androidx.core-ktx 1.3.1, androidx.drawerlayout 1.1.0, androidx.preference 1.1.1, com.google.android.material 1.2.0, firebase-messaging 20.2.4, com.google.android:flexbox 2.0.1, junit 4.13
2020-08-23 07:15:27 +09:00
|
|
|
implementation "androidx.preference:preference-ktx:1.1.1"
|
2019-09-13 00:13:00 +09:00
|
|
|
|
2020-12-07 03:32:21 +09:00
|
|
|
implementation "androidx.exifinterface:exifinterface:1.3.2"
|
2020-08-25 09:04:18 +09:00
|
|
|
|
2019-09-13 00:13:00 +09:00
|
|
|
// CustomTabs
|
2020-12-07 17:33:01 +09:00
|
|
|
implementation "androidx.browser:browser:1.3.0"
|
2019-09-13 00:13:00 +09:00
|
|
|
|
2019-10-05 21:28:04 +09:00
|
|
|
// Recyclerview
|
2019-12-02 11:06:51 +09:00
|
|
|
implementation "androidx.recyclerview:recyclerview:1.1.0"
|
2019-10-05 21:28:04 +09:00
|
|
|
|
2019-08-24 19:56:05 +09:00
|
|
|
kapt 'androidx.annotation:annotation:1.1.0'
|
2017-12-12 06:18:17 +09:00
|
|
|
|
2018-06-11 09:33:01 +09:00
|
|
|
// https://firebase.google.com/support/release-notes/android
|
2020-12-22 05:21:29 +09:00
|
|
|
implementation "com.google.firebase:firebase-messaging:21.0.1"
|
2017-08-24 20:44:06 +09:00
|
|
|
|
2019-07-12 13:38:19 +09:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
2018-03-27 12:07:40 +09:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
|
|
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
2019-08-24 19:56:05 +09:00
|
|
|
|
2018-09-15 01:36:05 +09:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
|
2020-12-07 03:32:21 +09:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$kotlinx_coroutines_version"
|
|
|
|
implementation("ru.gildor.coroutines:kotlin-coroutines-okhttp:1.0")
|
2018-01-12 18:01:25 +09:00
|
|
|
|
2018-04-06 05:47:25 +09:00
|
|
|
// Anko Layouts
|
2018-08-31 22:22:51 +09:00
|
|
|
// sdk15, sdk19, sdk21, sdk23 are also available
|
2018-09-27 23:21:37 +09:00
|
|
|
implementation "org.jetbrains.anko:anko-sdk25:$anko_version"
|
2018-04-06 05:47:25 +09:00
|
|
|
implementation "org.jetbrains.anko:anko-appcompat-v7:$anko_version"
|
2017-05-19 08:20:42 +09:00
|
|
|
|
2018-04-06 05:47:25 +09: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-21 05:55:51 +09:00
|
|
|
|
Android Studio 4.0.0, Android gradple plugin 4.0.1, Gradle 6.1.1, kotlin 1.4.0, espresso-core:3.3.0-rc03, androidx.test:runner:1.3.0-rc03, androidx.appcompat 1.2.0, androidx.core-ktx 1.3.1, androidx.drawerlayout 1.1.0, androidx.preference 1.1.1, com.google.android.material 1.2.0, firebase-messaging 20.2.4, com.google.android:flexbox 2.0.1, junit 4.13
2020-08-23 07:15:27 +09:00
|
|
|
testImplementation "junit:junit:$junit_version" // しばらくはkotlin-testとjunitを併用
|
2017-12-22 12:12:32 +09:00
|
|
|
|
2020-09-09 05:17:32 +09:00
|
|
|
implementation 'com.squareup.okhttp3:okhttp:4.8.1'
|
|
|
|
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.8.1'
|
2019-01-15 23:47:08 +09:00
|
|
|
testImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
|
|
|
|
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.12.1'
|
2017-05-26 12:48:06 +09:00
|
|
|
|
2020-09-09 05:17:32 +09:00
|
|
|
def glide_version = '4.11.0'
|
2019-08-24 19:56:05 +09:00
|
|
|
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"
|
|
|
|
|
2020-10-24 12:14:53 +09:00
|
|
|
implementation "org.conscrypt:conscrypt-android:2.5.1"
|
2017-07-26 20:40:55 +09:00
|
|
|
|
2019-07-12 13:38:19 +09:00
|
|
|
implementation 'io.github.inflationx:calligraphy3:3.1.1'
|
|
|
|
implementation 'io.github.inflationx:viewpump:2.0.3'
|
2017-09-26 00:10:05 +09:00
|
|
|
|
2019-07-12 13:38:19 +09:00
|
|
|
implementation 'com.github.woxthebox:draglistview:1.6.6'
|
2017-12-21 20:33:35 +09:00
|
|
|
|
2018-04-06 05:47:25 +09:00
|
|
|
implementation 'com.github.omadahealth:swipy:1.2.3@aar'
|
2017-12-21 20:33:35 +09:00
|
|
|
|
2019-07-12 13:38:19 +09:00
|
|
|
implementation 'com.github.kenglxn.QRGen:android:2.5.0'
|
2018-01-15 06:47:42 +09:00
|
|
|
|
2018-04-06 05:47:25 +09:00
|
|
|
implementation 'commons-io:commons-io:2.6'
|
2018-01-15 06:47:42 +09:00
|
|
|
|
2018-04-06 05:47:25 +09:00
|
|
|
implementation 'org.hjson:hjson:3.0.0'
|
|
|
|
|
Android Studio 4.0.0, Android gradple plugin 4.0.1, Gradle 6.1.1, kotlin 1.4.0, espresso-core:3.3.0-rc03, androidx.test:runner:1.3.0-rc03, androidx.appcompat 1.2.0, androidx.core-ktx 1.3.1, androidx.drawerlayout 1.1.0, androidx.preference 1.1.1, com.google.android.material 1.2.0, firebase-messaging 20.2.4, com.google.android:flexbox 2.0.1, junit 4.13
2020-08-23 07:15:27 +09:00
|
|
|
implementation 'com.google.android:flexbox:2.0.1' // 1.1.0 から AndroidX 依存
|
2018-04-06 05:47:25 +09:00
|
|
|
|
|
|
|
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
|
2018-01-18 02:39:16 +09:00
|
|
|
|
2020-10-24 12:14:53 +09:00
|
|
|
implementation 'com.google.android.exoplayer:exoplayer:2.12.0'
|
|
|
|
/*
|
|
|
|
WARNING: [Processor] Library '…\exoplayer-ui-2.12.0.aar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway.
|
|
|
|
Example of androidX reference: 'androidx/core/app/NotificationCompat$Builder'
|
|
|
|
Example of support library reference: 'android/support/v4/media/session/MediaSessionCompat$Token'
|
|
|
|
…expPlayerも苦労してるんだなあ…
|
|
|
|
*/
|
2018-01-21 21:46:36 +09:00
|
|
|
|
2019-07-12 13:38:19 +09:00
|
|
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
2017-04-21 01:23:59 +09:00
|
|
|
}
|
2017-05-24 18:20:56 +09:00
|
|
|
|
2017-11-04 23:51:15 +09:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
2017-12-22 21:59:52 +09:00
|
|
|
|
2018-09-12 14:55:15 +09:00
|
|
|
apply plugin: 'com.google.gms.google-services'
|
2019-01-29 10:56:24 +09:00
|
|
|
|