Skip to content
Open
Show file tree
Hide file tree
Changes from all 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.

129 changes: 129 additions & 0 deletions arsceneview/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
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")
}

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_21
targetCompatibility = JavaVersion.VERSION_21
}
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(projects.sceneview)

// ARCore
api(libs.arcore)
}

mavenPublishing {
publishToMavenCentral()
signAllPublications()
}

dokka {
moduleName.set("SceneView Android")
dokkaSourceSets.configureEach {
externalDocumentationLinks.register("example-docs") {
url("https://example.com/docs/")
packageListUrl("https://example.com/docs/package-list")
}
}
dokkaSourceSets.main {
includes.from("README.md")
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl("https://example.com/src")
remoteLineSuffix.set("#L")
}
reportUndocumented.set(true)
skipEmptyPackages.set(true)
skipDeprecated.set(true)
jdkVersion.set(21)

// Do not create a link to the online Android SDK documentation
enableAndroidDocumentationLink.set(false)

// AndroidX + Compose docs
externalDocumentationLinks {
register("developer.android.com/reference") {
url("https://developer.android.com/reference/")
packageListUrl("https://developer.android.com/reference/androidx/package-list")
}
register("developer.android.com/reference/kotlin") {
url("https://developer.android.com/reference/kotlin/")
packageListUrl("https://developer.android.com/reference/kotlin/androidx/package-list")
}
}

sourceLink {
localDirectory.set(project.file("src/main/kotlin"))
// URL showing where the source code can be accessed through the web browser
remoteUrl("https://github.com/sceneview/sceneview-android/blob/main/${project.name}/src/main/kotlin")
// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#L")
}
}
}

filamentTools {
// Material generation: .mat -> .filamat
materialInputDir.set(project.layout.projectDirectory.dir("src/main/materials"))
materialOutputDir.set(project.layout.projectDirectory.dir("src/main/assets/materials"))
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")
}
}
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.
4 changes: 3 additions & 1 deletion arsceneview/src/main/java/io/github/sceneview/ar/ARScene.kt
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ fun ARScene(
onViewUpdated?.invoke(sceneView)
},
onReset = {},
onRelease = { sceneView -> sceneView.destroy() }
onRelease = { sceneView ->
sceneView.destroy()
}
)
}
}
Expand Down
40 changes: 40 additions & 0 deletions build-logic/configuration/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`kotlin-dsl`
alias(libs.plugins.publish)
}

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"
}
}
}

mavenPublishing {
publishToMavenCentral()
signAllPublications()
}
Loading