Skip to content

Commit 1b54ea1

Browse files
Wire LicensesTask to Android resources source set (#347)
* Wire `LicensesTask` to Android resources sourceset This fixes #346 * Update directory used in tests --------- Co-authored-by: Aurimas <aurimas@google.com>
1 parent fd801d2 commit 1b54ea1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

oss-licenses-plugin/src/main/groovy/com/google/android/gms/oss/licenses/plugin/OssLicensesPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class OssLicensesPlugin implements Plugin<Project> {
5757
it.dependenciesJson.set(dependencyTask.flatMap { it.dependenciesJson })
5858
}
5959
project.logger.debug("Registered task ${licenseTask.name}")
60-
variant.sources.resources.addGeneratedSourceDirectory(licenseTask, LicensesTask::getGeneratedDirectory)
60+
variant.sources.res.addGeneratedSourceDirectory(licenseTask, LicensesTask::getGeneratedDirectory)
6161

6262
TaskProvider<LicensesCleanUpTask> cleanupTask = project.tasks.register(
6363
"${variant.name}OssLicensesCleanUp",

oss-licenses-plugin/src/test/java/com/google/android/gms/oss/licenses/plugin/EndToEndTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class EndToEndTest(private val agpVersion: String, private val gradleVersion: St
8989
Assert.assertEquals(expectedDependenciesJson(isBuiltInKotlinEnabled()), dependenciesJson.readText())
9090

9191
val metadata =
92-
File(projectDir, "build/generated/resources/releaseOssLicensesTask/raw/third_party_license_metadata")
92+
File(projectDir, "build/generated/res/releaseOssLicensesTask/raw/third_party_license_metadata")
9393
Assert.assertEquals(expectedContents(isBuiltInKotlinEnabled()), metadata.readText())
9494

9595
val cleanResult = GradleRunner.create()

0 commit comments

Comments
 (0)