76 lines
2.1 KiB
Groovy
76 lines
2.1 KiB
Groovy
apply plugin: 'com.android.library'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
android {
|
|
buildToolsVersion versions.buildTools
|
|
compileSdkVersion versions.compileSdk
|
|
ndkVersion versions.ndk
|
|
|
|
defaultConfig {
|
|
minSdkVersion versions.minSdk
|
|
targetSdkVersion versions.targetSdk
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments.addAll(rootProject.ext.cmakeArgs)
|
|
cppFlags.addAll(rootProject.ext.cppFlags)
|
|
}
|
|
}
|
|
}
|
|
|
|
// The gltfio library has two variants: full and lite. Here we default to the "full" variant.
|
|
// Replace "full" with "lite" to use the gltfio-lite variant, which has a smaller binary size
|
|
// but comes with certain restrictions.
|
|
defaultConfig {
|
|
missingDimensionStrategy 'functionality', 'full'
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path "CMakeLists.txt"
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
jni.srcDirs "src/main/cpp"
|
|
kotlin.srcDirs += "src/main/java"
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
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')
|
|
|
|
afterEvaluate { project ->
|
|
publishing {
|
|
publications {
|
|
release(MavenPublication) {
|
|
artifactId = POM_ARTIFACT_ID
|
|
from components.release
|
|
}
|
|
}
|
|
}
|
|
}
|