특정 productFlavor 및 buildType을 gradle에 추가하는 방법을 궁금합니다. 예를 들어 productFlavor가 free
이고 빌드 유형이 release
인 경우, assembleFreeRelease
작업에 종속성을 어떻게 추가 할 수 있습니까?특정 productFlavor 및 buildType에 종속성을 추가하십시오.
많은 변형을 시도했지만 어느 것도 작동하지 않습니다.
예를 들어 나는 시도 :task('release', dependsOn: assembleProductionRelease) {
}
// error: Could not find property 'assembleProductionRelease' on root project 'app'.
또는 :
이task('release', dependsOn: 'assembleProductionRelease') {
}
여기에는 오류가 없지만 작업이 모든 맛에 대해 실행 및 유형, 매우 혼란을 구축됩니다.
종속성 블록이 android 블록 뒤에있는 경우 –
하지만 맛을 buildTypes와 어떻게 조합합니까? 예 : flavor1DebugCompile 또는 flavor1ReleaseCompile. 그것은 나를 위해 작동하지 않습니다 –
이것을 작동 시키십시오? – Theyouthis