본문 바로가기
Android/Tip

[Gralde] DefaultConfig 객체 설명

by Jay Son 아기 냥이 해린 짱💖 2021. 5. 14.

Android Studio build.gradle DefaultConfig 에 사용 할 수 있는 Property 값 정리

 

ex)

def name = android.defaultConfig.versionName

 

    defaultConfig {
        applicationId "com.json.client.sample"
        minSdkVersion 22
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

 

Properties

Property Description
applicationId The application ID.
applicationIdSuffix Application id suffix. It is appended to the "base" application id when calculating the final application id for a variant.
consumerProguardFiles ProGuard rule files to be included in the published AAR.
dimension Specifies the flavor dimension that this product flavor belongs to.
externalNativeBuild Encapsulates per-variant CMake and ndk-build configurations for your external native build.
generatedDensities deprecated
Deprecated equivalent of vectorDrawablesOptions.generatedDensities.
javaCompileOptions Options for configuration Java compilation.
manifestPlaceholders The manifest placeholders.
multiDexEnabled Whether Multi-Dex is enabled for this variant.
multiDexKeepFile Text file that specifies additional classes that will be compiled into the main dex file.
multiDexKeepProguard Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file.
ndk Encapsulates per-variant configurations for the NDK, such as ABI filters.
proguardFiles Specifies the ProGuard configuration files that the plugin should use.
signingConfig Signing config used by this product flavor.
testApplicationId Test application ID.
testFunctionalTest See instrumentation.
testHandleProfiling See instrumentation.
testInstrumentationRunner Test instrumentation runner class name.
testInstrumentationRunnerArguments Test instrumentation runner custom arguments.
vectorDrawables Options to configure the build-time support for vector drawables.
versionCode Version code.
versionName Version name.
versionNameSuffix Version name suffix. It is appended to the "base" version name when calculating the final version name for a variant.
wearAppUnbundled Returns whether to enable unbundling mode for embedded wear app. If true, this enables the app to transition from an embedded wear app to one distributed by the play store directly.

출처 : https://google.github.io/android-gradle-dsl/3.1/com.android.build.gradle.internal.dsl.DefaultConfig.html

반응형