Include custom conversion classes in desugar library configuration
The custom conversion classes are referenced from the configuration
(specified in the JSON file), and is now part of of the desugar
library configuration maven artifact.
Bug: 145393922
Change-Id: I8ebe654e177abed8ad05259774d360b09e8c76de
diff --git a/build.gradle b/build.gradle
index f825010..fba205d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -90,6 +90,12 @@
}
output.resourcesDir = 'build/classes/cfSegments'
}
+ libraryDesugarConversions {
+ java {
+ srcDirs = ['src/library_desugar/java']
+ }
+ output.resourcesDir = 'build/classes/library_desugar_conversions'
+ }
debugTestResources {
java {
srcDirs = ['src/test/debugTestResources']
@@ -852,7 +858,14 @@
}
}
-task testJar(type: ShadowJar, dependsOn: testClasses) {
+task buildLibraryDesugarConversions(type: Zip, dependsOn: downloadDeps) {
+ from sourceSets.libraryDesugarConversions.output
+ include "java/**/*.class"
+ baseName 'library_desugar_conversions'
+ destinationDir file('build/libs')
+}
+
+task testJar(type: ShadowJar, dependsOn: [testClasses, buildLibraryDesugarConversions]) {
baseName = "r8tests"
from sourceSets.test.output
// We only want to include tests that use R8 when generating keep rules for applymapping.