Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: adopt
java-version: 17
java-version: 21

- name: Make gradlew executable
run: chmod +x ./gradlew
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: adopt
java-version: 17
java-version: 21

- name: Make gradlew executable
run: chmod +x ./gradlew
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upload-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: adopt
java-version: 17
java-version: 21

- name: Make gradlew executable
run: chmod +x ./gradlew
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
.cxx
local.properties
/.idea
/build-logic/build
/build-logic/configuration/build
/build-logic/gradle
94 changes: 0 additions & 94 deletions arsceneview/build.gradle

This file was deleted.

116 changes: 116 additions & 0 deletions arsceneview/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import org.gradle.kotlin.dsl.the

plugins {
id("com.android.library")
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.publish)
alias(libs.plugins.dokka)
id("filament-tools-plugin")
}

// *************************************************************************************************
// Filament Plugin
// *************************************************************************************************
//
// Needed if you want to generate Materials, Indirect Light (IBL) and Skyboxes.
//
// 1) Copy/paste the /buildSrc dir into your project root folder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the plugin code is now located in build-logic, the manual for adding it to your own project should be updated.

By the way, do you think it's possible to release the plugin as a part of Sceneview? So it can be included as a dependency instead of copying the code.

Copy link
Contributor Author

@kalmanbencze kalmanbencze Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I think so, I'll set it up, and if works, I'll update the readme with how to add and run the plugin

// 2) Copy/paste the plugins line above (plugins: { id 'filament-tools-plugin' }) and bellow into
// your app/module build.gradle
// 3) Download the Filament tools release archive for your development desktop:
// Filament release download: https://github.com/google/filament/releases
// (Choose the corresponding version to the filament_version bellow)
// 4) Copy/paste the Filament Plugin part from the gradle.properties file to your project
// 5) Sync Gradle and clean your project
//if (project.properties["filamentPluginEnabled"]?.toString()?.toBoolean() == true) {
// configure<io.github.sceneview.FilamentToolsPluginExtension> {
// // Material generation: .mat -> .filamat
// materialInputDir.set(project.layout.projectDirectory.dir("src/main/materials"))
// materialOutputDir.set(project.layout.projectDirectory.dir("src/main/assets/materials"))
// // IBL and Skybox generation: .hdr -> _ibl.ktx and _skybox.ktx
// iblInputDir.set(project.layout.projectDirectory.dir("src/main/environments"))
// iblOutputDir.set(project.layout.projectDirectory.dir("src/main/assets/environments"))
// iblFormat = "ktx"
// }
//
// tasks.named("clean") {
// doFirst {
// delete("src/main/assets/materials")
// delete("src/main/assets/environments")
// }
// }
//}
// *************************************************************************************************

android {
namespace = "io.github.sceneview.ar"
compileSdk = 36

defaultConfig {
minSdk = 24

consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
getByName("debug") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
}
// Preserve compression of filament files
androidResources {
noCompress.add("filamat")
noCompress.add("ktx")
}
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)

// Compose
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.foundation)

// SceneView
api(project(":sceneview"))

// ARCore
api(libs.arcore)
}

mavenPublishing {
publishToMavenCentral()
signAllPublications()
}

if (project.properties["filamentPluginEnabled"]?.toString()?.toBoolean() == true) {
configure<io.github.sceneview.FilamentToolsPluginExtension> {
// Material generation: .mat -> .filamat
materialInputDir.set(project.layout.projectDirectory.dir("src/main/materials"))
materialOutputDir.set(project.layout.projectDirectory.dir("src/main/assets/materials"))
}

tasks.named("clean") {
doFirst {
delete("src/main/assets/materials")
delete("src/main/assets/environments")
}
}
}
Binary file not shown.
Binary file not shown.
Binary file modified arsceneview/src/main/assets/materials/face_mesh.filamat
Binary file not shown.
Binary file not shown.
Binary file modified arsceneview/src/main/assets/materials/plane_renderer.filamat
Binary file not shown.
Binary file not shown.
34 changes: 34 additions & 0 deletions build-logic/configuration/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl`
}

group = "io.github.sceneview.buildlogic.configuration"

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}

dependencies {
compileOnly(libs.android.gradlePlugin)
compileOnly(libs.kotlin.gradlePlugin)
compileOnly(libs.publish)
}

gradlePlugin {
plugins {
register("filament-tools-plugin") {
id = "filament-tools-plugin"
implementationClass = "io.github.sceneview.FilamentToolsPlugin"
}
}
}
Loading