Skip to content

Commit

Permalink
Default to debug signing key for Glide's samples
Browse files Browse the repository at this point in the history
Without the debug signing key, trying to build the samples will fail because apparently the release config requires a custom signing configuration.

I also cleaned up the top level build file a bit.

PiperOrigin-RevId: 469333168
  • Loading branch information
sjudd authored and glide-copybara-robot committed Aug 23, 2022
1 parent 896a0b7 commit 13ca8bc
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ subprojects { project ->
}
}


tasks.withType(JavaCompile) {


// gifencoder is a legacy project that has a ton of warnings and is basically never
// modified, so we're not going to worry about cleaning it up.
// Imgur uses generated code from dagger that has warnings.
Expand Down Expand Up @@ -92,8 +89,6 @@ subprojects { project ->
* Disable deprecation warnings for ViewTarget/BaseTarget for now.
*/ \
<< "-Xlint:-deprecation"


}
}

Expand Down Expand Up @@ -148,7 +143,6 @@ subprojects { project ->
}

afterEvaluate {

if (project.hasProperty("android")
&& project.name != 'pmd' ) {
android {
Expand All @@ -158,26 +152,33 @@ subprojects { project ->
// Caught by the violations plugin.
abortOnError false
}
}

android.variantFilter { variant ->
if(variant.buildType.name == 'debug') {
variant.setIgnore(true)
buildFeatures {
buildConfig = false
}

// Signing isn't relevant to a library. Our signing is done via
// a GPG key at upload time, there's no APK to sign.
buildTypes {
release {
signingConfig signingConfigs.debug
}
}

// It's faster to build only one variant, and debug / release
// are identical for Glide.
variantFilter { variant ->
if(variant.buildType.name == 'debug') {
variant.setIgnore(true)
}
}

}
}

if (project.tasks.findByName('check')) {
check.dependsOn('checkstyle')
check.finalizedBy violations
}

if (project.plugins.hasPlugin('com.android.library')) {
android {
buildFeatures {
buildConfig = false
}
}
}
}
}

0 comments on commit 13ca8bc

Please sign in to comment.