diff --git a/app/build.gradle b/app/build.gradle index 3319c62..eaaecb5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,44 +65,41 @@ } flavorDimensions "env" - - productFlavors { - acc { - dimension "env" - applicationIdSuffix ".acc" - versionNameSuffix "-acc" - } - - prd { - dimension "env" - applicationIdSuffix "" - versionNameSuffix "" - } + + productFlavors { + acc { + dimension "env" + applicationIdSuffix ".acc" } - - applicationVariants.all { variant -> - if (variant.buildType.name == "release") { - variant.outputs.each { output -> - // Avoid to rename, so Fastlane default will work for now - //output.outputFile = new File(output.outputFile.parent, output.outputFile.name.replace("app-release.apk", "dappre_${versionName}.${versionCode}.apk")) - - if (variant.getBuildType().isMinifyEnabled()) { - variant.assemble.doLast { - copy { - from variant.mappingFile - into output.outputFile.parent - // Avoid to rename, so Fastlane default will work for now - //rename { - // String fileName -> - // "mapping_${versionName}.${versionCode}.txt" - //} - } + + prd { + dimension "env" + } + } + + applicationVariants.all { variant -> + if (variant.buildType.name == "release") { + variant.outputs.each { output -> + // Avoid to rename, so Fastlane default will work for now + //output.outputFile = new File(output.outputFile.parent, output.outputFile.name.replace("app-release.apk", "dappre_${versionName}.${versionCode}.apk")) + + if (variant.getBuildType().isMinifyEnabled()) { + variant.assemble.doLast { + copy { + from variant.mappingFile + into output.outputFile.parent + // Avoid to rename, so Fastlane default will work for now + //rename { + // String fileName -> + // "mapping_${versionName}.${versionCode}.txt" + //} } } } } } } +} dependencies { //compile fileTree(dir: 'libs', include: ['*.jar']) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index f893284..51453d9 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -29,8 +29,8 @@ lane :build do gradle( task: "clean assemble", + build_type: 'Release', flavor: "prd", - build_type: 'Release' ) end @@ -81,8 +81,8 @@ message: "Provide changelogs for this version", ) supply( - apk: 'app/build/outputs/apk/release/app-release.apk', - mapping: 'app/build/outputs/apk/release/mapping.txt', + apk: 'app/build/outputs/apk/prd/release/app-prd-release.apk', + mapping: 'app/build/outputs/apk/prd/release/mapping.txt', track: 'alpha', skip_upload_apk: false, skip_upload_metadata: false,