컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android Gradle 플러그인 2.0.0(2016년 4월)
- 종속 항목:
|
최소 버전 |
기본 버전 |
참고 |
Gradle |
2.10 |
2.10 |
자세한 내용은 Gradle 업데이트하기를 참고하세요. |
SDK 빌드 도구 |
21.1.1 |
21.1.1 |
SDK 빌드 도구를 설치 또는 구성합니다. |
- New:
-
- 바이트 코드 삽입을 지원하고 에뮬레이터나 실제 기기에서 실행 중인 앱에 코드 및 리소스 업데이트를 푸시하여 Instant Run을 사용 설정합니다.
- 앱이 실행되지 않는 경우에도 증분 빌드 지원을 추가합니다.
Android 디버그 브리지를 통해 증분 변경사항을 연결된 기기에 푸시하여 전체 빌드 시간이 개선됩니다.
maxProcessCount
를 추가하여 동시에 생성할 수 있는 최대 worker dex 프로세스 수를 제어합니다. 모듈 수준 build.gradle
파일의 다음 코드는 최대 동시 프로세스 수를 4로 설정합니다.
Groovy
android {
...
dexOptions {
maxProcessCount = 4 // this is the default value
}
}
Kotlin
android {
...
dexOptions {
maxProcessCount = 4 // this is the default value
}
}
- 실험용 코드 축소기를 추가하여 종속 항목의 사전 덱싱을 지원하고 리덱싱을 줄이며 이것은 Proguard에서 지원되지 않습니다. 이로써 디버그 빌드 변형의 빌드 속도가 개선됩니다. 실험용 축소기가 최적화 및 난독화를 지원하지 않으므로 출시 빌드에 Proguard를 사용 설정해야 합니다. 디버그 빌드에 실험용 축소기를 사용 설정하려면 모듈 수준
build.gradle
파일에 다음을 추가하세요.
Groovy
android {
...
buildTypes {
debug {
minifyEnabled true
useProguard false
}
release {
minifyEnabled true
useProguard true // this is a default setting
}
}
}
Kotlin
android {
...
buildTypes {
getByName("debug") {
minifyEnabled = true
useProguard = false
}
getByName("release") {
minifyEnabled = true
useProguard = true // this is a default setting
}
}
}
- 리소스 축소기의 로깅 지원 및 성능 개선을 추가합니다.
이제 리소스 축소기가 모든 작업을 Proguard 로그 파일과 동일한 폴더에 있는
resources.txt
파일에 기록합니다.
- 변경된 동작:
-
- 해결된 문제:
-
- 테스트 및 기본 빌드 구성 모두에서 AAR 종속 항목이 중복되는 문제가 해결되었습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-30(UTC)
[null,null,["최종 업데이트: 2025-08-30(UTC)"],[],[],null,["\u003cbr /\u003e\n\nAndroid Gradle Plugin 2.0.0 (April 2016)\n\n\u003cbr /\u003e\n\nDependencies:\nNew:\n:\n - Enables [Instant Run](/tools/building/building-studio#instant-run) by supporting bytecode injection, and pushing code and resource updates to a running app on the emulator or a physical device.\n - Added support for incremental builds, even when the app isn't running. Full build times are improved by pushing incremental changes through the [Android Debug Bridge](/tools/help/adb) to the connected device.\n - Added [`maxProcessCount`](https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.DexOptions.html#com.android.build.gradle.internal.dsl.DexOptions:maxProcessCount) to control how many worker dex processes can be spawned concurrently. The following code, in the module-level `build.gradle` file, sets the maximum number of concurrent processes to 4: \n\n Groovy \n\n ```groovy\n android {\n ...\n dexOptions {\n maxProcessCount = 4 // this is the default value\n }\n }\n ```\n\n Kotlin \n\n ```kotlin\n android {\n ...\n dexOptions {\n maxProcessCount = 4 // this is the default value\n }\n }\n ```\n - Added an experimental code shrinker to support pre-dexing and reduce re-dexing of dependencies, which are not supported with Proguard. This improves the build speed of your debug build variant. Because the experimental shrinker does not support optimization and obfuscation, you should enable Proguard for your release builds. To enable the experimental shrinker for your debug builds, add the following to your module-level `build.gradle` file: \n\n Groovy \n\n ```groovy\n android {\n ...\n buildTypes {\n debug {\n minifyEnabled true\n useProguard false\n }\n release {\n minifyEnabled true\n useProguard true // this is a default setting\n }\n }\n }\n ```\n\n Kotlin \n\n ```kotlin\n android {\n ...\n buildTypes {\n getByName(\"debug\") {\n minifyEnabled = true\n useProguard = false\n }\n getByName(\"release\") {\n minifyEnabled = true\n useProguard = true // this is a default setting\n }\n }\n }\n ```\n - Added logging support and improved performance for the resource shrinker. The resource shrinker now logs all of its operations into a `resources.txt` file located in the same folder as the Proguard log files.\n\nChanged behavior:\n:\n - When `minSdkVersion` is set to 18 or higher, APK signing uses SHA256.\n - DSA and ECDSA keys can now sign APK packages.\n **Note:** The [Android keystore](/training/articles/keystore) provider no\n longer supports [DSA keys on Android 6.0](/about/versions/marshmallow/android-6.0-changes#behavior-keystore) (API level 23) and higher.\n\n\nFixed issues:\n:\n - Fixed an issue that caused duplicate AAR dependencies in both the test and main build configurations."]]