From 4039981e719071473fa66515027188bdb71313ad Mon Sep 17 00:00:00 2001 From: technoir Date: Mon, 17 Jun 2019 14:08:08 +0300 Subject: [PATCH] Disable BuildConfig generation --- build.gradle | 6 ++++++ glide/build.gradle | 4 +--- scripts/upload.gradle | 2 -- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 2f5e90b5e4..586fdb9d2f 100644 --- a/build.gradle +++ b/build.gradle @@ -174,5 +174,11 @@ subprojects { project -> } } } + + if (project.plugins.hasPlugin('com.android.library')) { + android.libraryVariants.all { + it.generateBuildConfigProvider.configure { enabled = false } + } + } } } diff --git a/glide/build.gradle b/glide/build.gradle index 6bf91dcc6e..004bd95bec 100644 --- a/glide/build.gradle +++ b/glide/build.gradle @@ -70,7 +70,7 @@ static def getAndroidLibraryVariants(projects, variantName) { def getSourceFilesForVariantJar(variantName) { getAndroidLibraryVariantsForJar(variantName).collect { variant -> variant.getJavaCompileProvider().get().source.findAll { - return !it.getName().equals("R.java") && !it.getName().equals("BuildConfig.java") + return !it.getName().equals("R.java") } } } @@ -123,7 +123,6 @@ project.archivesBaseName = "${POM_ARTIFACT_ID}-${VERSION_NAME}" "${getAndroidSdkDirectory()}/docs/reference") } - exclude '**/BuildConfig.java' exclude '**/R.java' } @@ -145,7 +144,6 @@ jar { } ) exclude "**/R.class" - exclude "**/BuildConfig.class" exclude "**/R\$*.class" exclude "android/**" } diff --git a/scripts/upload.gradle b/scripts/upload.gradle index 06ab241b0a..57ce5dbb2c 100644 --- a/scripts/upload.gradle +++ b/scripts/upload.gradle @@ -181,7 +181,6 @@ afterEvaluate { project -> "${getAndroidSdkDirectory}/docs/reference") } - exclude '**/BuildConfig.java' exclude '**/R.java' } @@ -205,7 +204,6 @@ afterEvaluate { project -> task androidLibraryJar(type: Jar, dependsOn: compileDebugJavaWithJavac /* == variant.javaCompile */) { from compileDebugJavaWithJavac.destinationDir exclude '**/R.class' - exclude '**/BuildConfig.class' exclude '**/R$*.class' baseName "${JAR_PREFIX}${project.name}${JAR_POSTFIX}" }