diff options
author | Colin Cross <ccross@android.com> | 2019-05-08 14:30:12 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-05-08 14:30:12 -0700 |
commit | 6c6e6cd64d7754a988c2a4172010dce4e39cadd0 (patch) | |
tree | 18159bad6c412837e99f8ab0b9884d8b62862e76 /scripts | |
parent | 082640d6ee836bd440b7bf7794d8cf520b1e089f (diff) | |
download | build_soong-6c6e6cd64d7754a988c2a4172010dce4e39cadd0.tar.gz build_soong-6c6e6cd64d7754a988c2a4172010dce4e39cadd0.tar.bz2 build_soong-6c6e6cd64d7754a988c2a4172010dce4e39cadd0.zip |
Don't hide *.kotlin_module in turbine dependencies
The jars containing the merged header classes from transitive
static dependencies were stripping all of META-INF/. Kotlin
puts metadata in META-INF that is used to map the package to
the static class that contains the package-level functions.
This also exposed that the metadata in META-INF is always
called "name.kotlin_module", so a library that contains
kotlin files with a dependency that also contains kotlin files
would shade the metadata file. Use a unique name instead.
Fixes: 131709692
Test: m checkbuild
Change-Id: I5cd276e563206e37c4c0d90fe9f346e9396f88c0
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gen-kotlin-build-file.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/gen-kotlin-build-file.sh b/scripts/gen-kotlin-build-file.sh index 1e03f72e..177ca1b0 100755 --- a/scripts/gen-kotlin-build-file.sh +++ b/scripts/gen-kotlin-build-file.sh @@ -17,7 +17,7 @@ # Generates kotlinc module xml file to standard output based on rsp files if [[ -z "$1" ]]; then - echo "usage: $0 <classpath> <outDir> <rspFiles>..." >&2 + echo "usage: $0 <classpath> <name> <outDir> <rspFiles>..." >&2 exit 1 fi @@ -27,8 +27,9 @@ if [[ $1 == "-classpath" ]]; then fi; classpath=$1 -out_dir=$2 -shift 2 +name=$2 +out_dir=$3 +shift 3 # Path in the build file may be relative to the build file, we need to make them # absolute @@ -44,7 +45,7 @@ get_abs_path () { } # Print preamble -echo "<modules><module name=\"name\" type=\"java-production\" outputDir=\"${out_dir}\">" +echo "<modules><module name=\"${name}\" type=\"java-production\" outputDir=\"${out_dir}\">" # Print classpath entries for file in $(echo "$classpath" | tr ":" "\n"); do |