Remove srcDirs hack, use packagingOptions / exclude.

This commit is contained in:
Philip Rideout
2020-01-28 12:31:14 -08:00
parent d84d095c97
commit 1452ce62f4
5 changed files with 25 additions and 3 deletions
+11 -2
View File
@@ -31,8 +31,6 @@ android {
sourceSets {
main {
java.srcDirs += "../filament-android/src/main/java"
java.srcDirs += "../gltfio-android/src/main/java"
jni.srcDirs "src/main/cpp"
kotlin.srcDirs += "src/main/java"
}
@@ -42,11 +40,22 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// No need to package up the following shared libs, which arise as a side effect of our
// externalNativeBuild dependencies. When clients pick and choose from project-level gradle
// dependencies, these shared libs already get pulled in, so we need to avoid the error:
// "More than one file was found with OS independent path ..."
packagingOptions {
exclude 'lib/*/libfilament-jni.so'
exclude 'lib/*/libgltfio-jni.so'
}
}
dependencies {
implementation deps.kotlin
implementation deps.androidx.annotations
implementation project(':filament-android')
implementation project(':gltfio-android')
}
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
+9 -1
View File
@@ -29,7 +29,6 @@ android {
sourceSets {
main {
java.srcDirs += "../filament-android/src/main/java"
jni.srcDirs "src/main/cpp"
}
}
@@ -38,10 +37,19 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// No need to package up the following shared libs, which arise as a side effect of our
// externalNativeBuild dependencies. When clients pick and choose from project-level gradle
// dependencies, these shared libs already get pulled in, so we need to avoid the error:
// "More than one file was found with OS independent path ..."
packagingOptions {
exclude 'lib/*/libfilament-jni.so'
}
}
dependencies {
implementation deps.androidx.annotations
implementation project(':filament-android')
}
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
@@ -40,5 +40,7 @@ android {
dependencies {
implementation deps.kotlin
implementation project(':filament-android')
implementation project(':gltfio-android')
implementation project(':filament-utils-android')
}
@@ -37,5 +37,7 @@ android {
dependencies {
implementation deps.kotlin
implementation project(':filament-android')
implementation project(':gltfio-android')
implementation project(':filament-utils-android')
}
@@ -35,5 +35,6 @@ android {
dependencies {
implementation deps.kotlin
implementation project(':filament-android')
implementation project(':filament-utils-android')
}