From 18da2f891f13365278a91dc8cd626a8e51257905 Mon Sep 17 00:00:00 2001 From: tateisu Date: Wed, 25 Dec 2019 01:14:06 +0900 Subject: [PATCH] v1.0 --- .gitignore | 3 +++ app/build.gradle | 32 ++++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index ebdd23d..cdf6992 100755 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ /captures .externalNativeBuild .cxx + +*.apk +output.json diff --git a/app/build.gradle b/app/build.gradle index 73cd0dc..a68c3ea 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,3 +1,5 @@ +import java.text.SimpleDateFormat + apply plugin: 'com.android.application' apply plugin: 'kotlin-android' @@ -14,6 +16,8 @@ android { versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + // sign key is same to SubwayTooter } buildTypes { release { @@ -25,13 +29,32 @@ android { freeCompilerArgs += "-Xuse-experimental=kotlin.Experimental" } + // 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.buildType.name + def date = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()) + outputFileName = "../../ScreenShotButton-${flavor}-${versionCode}-${versionName}-${date}.apk" + } + } + } + } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test:runner:1.2.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + + implementation fileTree(dir: 'libs', include: ['*.jar']) implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" def kotlinx_coroutines_version = '1.3.1' @@ -39,12 +62,5 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinx_coroutines_version" implementation 'androidx.appcompat:appcompat:1.1.0' - - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation 'androidx.documentfile:documentfile:1.0.1' - - }