Skip to content

Commit 25e95d4

Browse files
committed
feat: Use Filament as a native dependency instead of shipping the submodule
1 parent b51ee83 commit 25e95d4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

package/android/build.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,35 @@ task deleteCmakeCache() {
172172
}
173173
}
174174

175+
task extractFilament(type: Copy) {
176+
// Define the AAR file as an input
177+
def filamentAar = configurations.compileClasspath.filter { it.name.contains("filament-android") }.singleFile
178+
inputs.file(filamentAar)
179+
180+
// Define the output directory
181+
def outputDir = file("$buildDir/filament")
182+
outputs.dir(outputDir)
183+
184+
from zipTree(filamentAar)
185+
into outputDir
186+
187+
include "jni/**/*"
188+
include "libs/**/*.so"
189+
190+
doFirst {
191+
println "Extracting Filament AAR..."
192+
}
193+
doLast {
194+
println "Extraction complete."
195+
}
196+
}
197+
175198
tasks.configureEach { task ->
176199
// C++ clean
177200
if (task.name.contains("clean")) {
178201
task.dependsOn(deleteCmakeCache)
179202
}
203+
if (task.name.startsWith('externalNativeBuild')) {
204+
task.dependsOn(extractFilament)
205+
}
180206
}

0 commit comments

Comments
 (0)