-
-
Save ariefbayu/a121545cfe6e49a81a031217d808f69e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
android { | |
compileSdkVersion 29 | |
defaultConfig { | |
applicationId "xyz.ariefbayu.gradlerenamer" | |
minSdkVersion 24 | |
targetSdkVersion 29 | |
versionCode 1 | |
versionName "1.0.20200628" | |
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | |
android.applicationVariants.all { variant -> | |
variant.outputs.all { output -> | |
def outputFile = output.outputFile | |
if (outputFile != null && outputFile.name.endsWith('.apk')) { | |
if(!outputFile.name.endsWith('-debug.apk')){ | |
def fileFormat = "${applicationId}" | |
fileFormat = fileFormat + "_" + "${defaultConfig.versionCode}" | |
fileFormat = fileFormat + "_" + defaultConfig.versionName | |
fileFormat = fileFormat + "_" + new Date().format("yyyyMMddHHmmss") | |
def fileName = outputFile.name.replace("app", fileFormat) | |
outputFileName = fileName | |
println(outputFileName) | |
} | |
} | |
} | |
} | |
} | |
} | |
compileOptions { | |
sourceCompatibility JavaVersion.VERSION_1_8 | |
targetCompatibility JavaVersion.VERSION_1_8 | |
} | |
kotlinOptions { | |
jvmTarget = '1.8' | |
} | |
} | |
dependencies { | |
def room_version = "2.2.5" | |
implementation fileTree(dir: "libs", include: ["*.jar"]) | |
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | |
implementation 'androidx.core:core-ktx:1.3.0' | |
implementation 'androidx.appcompat:appcompat:1.1.0' | |
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | |
implementation 'androidx.viewpager2:viewpager2:1.1.0-alpha01' | |
implementation 'androidx.cardview:cardview:1.0.0' | |
implementation 'androidx.legacy:legacy-support-v4:1.0.0' | |
implementation 'com.google.android.material:material:1.1.0' | |
implementation 'androidx.navigation:navigation-fragment:2.3.0' | |
implementation 'androidx.navigation:navigation-ui:2.3.0' | |
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' | |
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0' | |
implementation 'androidx.navigation:navigation-ui-ktx:2.3.0' | |
//<network-implementation> | |
//https://github.com/google/gson | |
implementation 'com.google.code.gson:gson:2.8.5' | |
//https://github.com/square/okhttp | |
implementation 'com.squareup.okhttp3:okhttp:3.10.0' | |
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0' | |
// https://github.com/square/retrofit | |
implementation 'com.squareup.retrofit2:retrofit:2.3.0' | |
implementation 'com.squareup.retrofit2:converter-gson:2.3.0' | |
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0' | |
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0' | |
// https://github.com/ReactiveX/RxAndroid | |
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2' | |
implementation 'io.reactivex.rxjava2:rxjava:2.2.9' | |
//</network-implementation> | |
//<room-implementation> | |
implementation "androidx.room:room-runtime:$room_version" | |
kapt "androidx.room:room-compiler:$room_version" | |
implementation "androidx.room:room-ktx:$room_version" | |
implementation "androidx.room:room-rxjava2:$room_version" | |
implementation "androidx.room:room-guava:$room_version" | |
testImplementation "androidx.room:room-testing:$room_version" | |
//</room-implementation> | |
//<kotpref-implementation> | |
implementation 'com.chibatching.kotpref:kotpref:2.11.0' | |
implementation 'com.chibatching.kotpref:initializer:2.11.0' | |
implementation 'com.chibatching.kotpref:enum-support:2.11.0' | |
implementation 'com.chibatching.kotpref:gson-support:2.11.0' | |
//</kotpref-implementation> | |
implementation "com.github.mukeshsolanki:android-otpview-pinview:2.1.0" | |
implementation 'com.afollestad:vvalidator:0.5.2' | |
testImplementation 'junit:junit:4.12' | |
androidTestImplementation 'androidx.test.ext:junit:1.1.1' | |
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment