반응형
SMALL
build.gradle(:app) 에서
import java.text.SimpleDateFormat
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
def getDate() {
return new SimpleDateFormat("yyyyMMdd").format(new Date())
}
def buildDate = getDate()
def nameOfApp = "APP_NAME"
android {
namespace 'com.APP_NAME'
compileSdk 34
defaultConfig {
...
versionCode 1
versionName "1.0.0"
setProperty("archivesBaseName", nameOfApp + "_v" + versionName + "(" + versionCode + ")_" + buildDate)
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
...
}
apk 이름 APP_NAME_v1.0.0(1)_20240304-debug.apk 으로 만들어짐
반응형
LIST
'AOS - Kotlin' 카테고리의 다른 글
[android/kotlin] base64 string > pdf 변환 후 파일 저장 (0) | 2024.04.05 |
---|---|
[android/kotlin] handler 데이터 여러개 전달하기 (0) | 2024.04.05 |
[android/kotlin] 안드로이드 카메라 이미지 회전, 리사이징 (0) | 2024.03.11 |
[android/kotlin] 안드로이드 13 권한 변경 (0) | 2024.03.11 |
[android/kotlin] webview shouldOverrideUrlLoading not called (0) | 2023.06.26 |