Skip to content

Commit

Permalink
Disable BuildConfig generation
Browse files Browse the repository at this point in the history
  • Loading branch information
technoir42 committed Jun 17, 2019
1 parent e7b6d2f commit 4039981
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Expand Up @@ -174,5 +174,11 @@ subprojects { project ->
}
}
}

if (project.plugins.hasPlugin('com.android.library')) {
android.libraryVariants.all {
it.generateBuildConfigProvider.configure { enabled = false }
}
}
}
}
4 changes: 1 addition & 3 deletions glide/build.gradle
Expand Up @@ -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")
}
}
}
Expand Down Expand Up @@ -123,7 +123,6 @@ project.archivesBaseName = "${POM_ARTIFACT_ID}-${VERSION_NAME}"
"${getAndroidSdkDirectory()}/docs/reference")
}

exclude '**/BuildConfig.java'
exclude '**/R.java'
}

Expand All @@ -145,7 +144,6 @@ jar {
}
)
exclude "**/R.class"
exclude "**/BuildConfig.class"
exclude "**/R\$*.class"
exclude "android/**"
}
Expand Down
2 changes: 0 additions & 2 deletions scripts/upload.gradle
Expand Up @@ -181,7 +181,6 @@ afterEvaluate { project ->
"${getAndroidSdkDirectory}/docs/reference")
}

exclude '**/BuildConfig.java'
exclude '**/R.java'
}

Expand All @@ -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}"
}
Expand Down

0 comments on commit 4039981

Please sign in to comment.