[AOS] KeyStore, SigningKey, jks

2024. 1. 29. 15:38dev/aos

728x90
반응형

If you will deploy your app into store.

must be build app.

 

so android need keystore. you are understand this is like password.

 

in android studio 

Build - Generate Signed Bundle or APK

 

 

select no problem anyone Bundle or APK.

move next section, you create new keystorefile.

select Create new

 

you want path and custom jks file name.

like this.

 

 

and write your info and password number.

 

 

when your custom jks file. It apply before your build window.

 

end


If you want build auto complete?

so custom your app build.gradle.

 

first name setting

path : project/gradle.properties

SIGNED_STORE_FILE=D:/donguran/aos/app/LuxMaterial/app/luxMaterialKeyStore.jks
SIGNED_STORE_PASSWORD=1234
SIGNED_KEY_ALIAS=donguran
SIGNED_KEY_PASSWORD=1234

 

 

add signingConfigs

or Project Structure - Module - Sigining Configs

android {
    signingConfigs {
        key {
            storeFile file(SIGNED_STORE_FILE)
            storePassword SIGNED_STORE_PASSWORD
            keyAlias SIGNED_KEY_ALIAS
            keyPassword SIGNED_KEY_PASSWORD
        }
    }

 

defaultConfig {
    applicationId "com.donguran.luxMaterial"
    minSdk 21
    targetSdk 34
    targetSdkVersion 34
    versionCode 1
    versionName "1.00"
    multiDexEnabled true
    vectorDrawables.useSupportLibrary true
    signingConfig signingConfigs.key

    // testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    debug {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        buildConfigField "Boolean", "DEBUG_MODE", "true"
    }
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        buildConfigField "Boolean", "DEBUG_MODE", "false"
    }
}
buildFeatures {
    buildConfig = true
}

 

 

Flutter register jks 

signingConfigs {
    release {
        storeFile file('sample_keystore.jks')
        storePassword 'sample'
        keyAlias 'sample'
        keyPassword 'sample'
    }
}

 

2024-04-18-목 : AOS에서도 마찬가지로 바로 사용할 수 있도록 코드를 짤 수 있다.

        config {
            keyAlias 'donguran'
            keyPassword '123456'
            storeFile file('./donguran.keystore')
            storePassword '123456'
        }

 

 

buildTypes 적용

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.config
        }
    }
728x90
반응형

'dev > aos' 카테고리의 다른 글

[AOS] hide Bottom Navigation(Full Screen)  (0) 2024.02.01
[FingerPush] Android SDK Menual:Cloud Messaging  (0) 2024.01.30
[AOS] Proguard  (0) 2024.01.25
[AOS] onBackPressed  (0) 2024.01.22
[AOS] Firebase Crashlytics  (0) 2024.01.19