diff --git a/.gitignore b/.gitignore index e1601d1..7c63487 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /local.properties /.idea/workspace.xml /.idea/libraries +/.idea/caches .DS_Store /build /captures diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..2715a34 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 17e371a..c8cf5ba 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,14 +3,14 @@ import java.text.SimpleDateFormat apply plugin: 'com.android.application' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 26 defaultConfig { - applicationId "jp.juggler.fadownloader" minSdkVersion 14 - targetSdkVersion 25 - versionCode 18 - versionName "1.12.1" + targetSdkVersion 26 + + versionCode 19 + versionName "1.13.0" + applicationId "jp.juggler.fadownloader" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { @@ -19,52 +19,57 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + flavorDimensions "f1" productFlavors { rc { + dimension "f1" + } rcAdFree { + dimension "f1" } dev { + dimension "f1" applicationId "jp.juggler.fadownloader.dev" } } // Generate Signed APK のファイル名を変更 - applicationVariants.all { variant -> + android.applicationVariants.all { variant -> if (variant.buildType.name == "release") { - variant.outputs.each { output -> - if (output.outputFile != null && output.outputFile.name.endsWith('.apk')) { - // Rename APK - def versionCode = defaultConfig.versionCode - def versionName = defaultConfig.versionName - def flavor = variant.flavorName - def date = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()) - def newName = "FADownloader-${flavor}-${versionCode}-${versionName}-${date}.apk" - output.outputFile = new File((String) output.outputFile.parent, (String) newName) - } + 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 = "../../FADownloader-${flavor}-${versionCode}-${versionName}-${date}.apk" } } } + } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:25.3.0' - compile 'com.google.android.gms:play-services-location:10.2.0' - compile 'com.google.firebase:firebase-ads:10.2.0' + testImplementation 'junit:junit:4.12' + + implementation "com.android.support:appcompat-v7:$asl_version" + implementation 'com.google.android.gms:play-services-location:15.0.1' + implementation 'com.google.firebase:firebase-ads:15.0.1' - compile project(':exif') - compile project(':billing') + implementation project(':exif') + implementation project(':billing') - testCompile 'junit:junit:4.12' - compile 'org.apache.commons:commons-lang3:3.3.2' - compile 'commons-io:commons-io:2.4' - compile 'com.neovisionaries:nv-websocket-client:1.31' + implementation 'org.apache.commons:commons-lang3:3.3.2' + implementation 'commons-io:commons-io:2.6' + implementation 'com.neovisionaries:nv-websocket-client:2.5' } diff --git a/billing/build.gradle b/billing/build.gradle index 4b17783..0ef858f 100644 --- a/billing/build.gradle +++ b/billing/build.gradle @@ -1,12 +1,11 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion 26 defaultConfig { minSdkVersion 14 - targetSdkVersion 25 + targetSdkVersion 26 versionCode 1 versionName "1.0" @@ -22,10 +21,10 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(dir: 'libs', include: ['*.jar']) + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:25.3.0' - testCompile 'junit:junit:4.12' + implementation "com.android.support:appcompat-v7:$asl_version" + testImplementation 'junit:junit:4.12' } diff --git a/build.gradle b/build.gradle index 9d51d3c..8adcbee 100644 --- a/build.gradle +++ b/build.gradle @@ -1,20 +1,30 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { + + ext.kotlin_version = '1.2.61' + ext.kotlin_coroutines_version = '0.24.0' + ext.anko_version = '0.10.5' + ext.asl_version = '26.1.0' + repositories { jcenter() + google() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' - classpath 'com.google.gms:google-services:3.0.0' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files + classpath 'com.android.tools.build:gradle:3.1.4' + classpath 'com.google.gms:google-services:3.2.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { jcenter() + google() + maven { url 'https://maven.google.com' } + maven { url 'https://jitpack.io' } } } diff --git a/exif/build.gradle b/exif/build.gradle index 819c7b2..35b24ec 100644 --- a/exif/build.gradle +++ b/exif/build.gradle @@ -1,12 +1,10 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" - + compileSdkVersion 26 defaultConfig { minSdkVersion 14 - targetSdkVersion 25 + targetSdkVersion 26 versionCode 1 versionName "1.0" @@ -22,11 +20,11 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(dir: 'libs', include: ['*.jar']) + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'org.apache.commons:commons-lang3:3.3.2' - compile 'commons-io:commons-io:2.4' - testCompile 'junit:junit:4.12' + implementation 'org.apache.commons:commons-lang3:3.3.2' + implementation 'commons-io:commons-io:2.6' + testImplementation 'junit:junit:4.12' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 190ae0d..2df53b5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip \ No newline at end of file