For instance to build only 64 bit variants: ./build.sh -q x86_64,arm64-v8a release This change also cleans up build.sh and Gradle files.
70 lines
2.1 KiB
Groovy
70 lines
2.1 KiB
Groovy
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
android {
|
|
flavorDimensions "functionality"
|
|
productFlavors {
|
|
full {
|
|
dimension "functionality"
|
|
}
|
|
|
|
lite {
|
|
dimension "functionality"
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
kotlin.srcDirs += "src/main/java"
|
|
}
|
|
}
|
|
|
|
// 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'
|
|
}
|
|
}
|
|
|
|
configurations.all { config ->
|
|
// Hack to preserve the version of the dependencies
|
|
if (!config.name.endsWith('Publication')) {
|
|
resolutionStrategy {
|
|
dependencySubstitution {
|
|
substitute(module("com.google.android.filament:gltfio-android:${VERSION_NAME}")).with(project(":gltfio-android"))
|
|
substitute(module("com.google.android.filament:gltfio-android-lite:${VERSION_NAME}")).with(project(":gltfio-android"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation deps.kotlin
|
|
implementation deps.androidx.annotations
|
|
implementation project(':filament-android')
|
|
|
|
fullImplementation module("com.google.android.filament:gltfio-android:${VERSION_NAME}")
|
|
liteImplementation module("com.google.android.filament:gltfio-android-lite:${VERSION_NAME}")
|
|
}
|
|
|
|
apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
|
|
|
|
afterEvaluate {
|
|
publishing {
|
|
publications {
|
|
fullRelease(MavenPublication) {
|
|
artifactId = POM_ARTIFACT_ID_FULL
|
|
from components.fullRelease
|
|
}
|
|
|
|
liteRelease(MavenPublication) {
|
|
artifactId = POM_ARTIFACT_ID_LITE
|
|
from components.liteRelease
|
|
}
|
|
}
|
|
}
|
|
}
|