Skip to content

Commit

Permalink
🐛 Allow the gradle plugin to work on any variant
Browse files Browse the repository at this point in the history
  • Loading branch information
xgouchet committed Jan 15, 2021
1 parent d60a4bd commit d9e6060
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package com.datadog.gradle.config

import com.jfrog.bintray.gradle.BintrayExtension
import org.gradle.api.Project
import org.gradle.api.internal.artifacts.dependencies.DefaultSelfResolvingDependency
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.publish.maven.tasks.AbstractPublishToMaven
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class DdAndroidGradlePlugin : Plugin<Project> {

target.afterEvaluate {
androidExtension.applicationVariants.forEach {
if (it.name.endsWith("Release")) {
configureVariant(target, it, apiKey, extension)
}
configureVariant(target, it, apiKey, extension)
}
}
}
Expand All @@ -51,8 +49,8 @@ class DdAndroidGradlePlugin : Plugin<Project> {
apiKey: String,
extension: DdExtension
) {
val flavorName = variant.name.removeSuffix("Release")
val uploadTaskName = UPLOAD_TASK_NAME + flavorName.capitalize()
val flavorName = variant.flavorName
val uploadTaskName = UPLOAD_TASK_NAME + variant.name.capitalize()

val uploadTask = target.tasks.create(
uploadTaskName,
Expand Down

0 comments on commit d9e6060

Please sign in to comment.