diff --git a/README.md b/README.md
index 3662d26490..283f2879e2 100644
--- a/README.md
+++ b/README.md
@@ -121,9 +121,9 @@ This repository not only contains the core Filament engine, but also its support
and tools.
- `android`: Android libraries and projects
- - `build`: Custom Gradle tasks for Android builds
- `filamat-android`: Filament material generation library (AAR) for Android
- `filament-android`: Filament library (AAR) for Android
+ - `gltfio-android`: Filament glTF loading library (AAR) for Android
- `samples`: Android-specific Filament samples
- `art`: Source for various artworks (logos, PDF manuals, etc.)
- `assets`: 3D assets to use with sample applications
@@ -548,7 +548,7 @@ as explained in the sections above. You must have the following ABIs built in
- `x86_64`
- `x86`
-To build Filament's AAR simply open the Android Studio project in `android/filament-android`. The
+To build Filament's AAR simply open the Android Studio project in `android/`. The
AAR is a universal AAR that contains all supported build targets:
- `arm64-v8a`
@@ -559,8 +559,8 @@ AAR is a universal AAR that contains all supported build targets:
To filter out unneeded ABIs, rely on the `abiFilters` of the project that links against Filament's
AAR.
-Alternatively you can build the AAR from the command line by executing the following the
-`android/filament-android` directory:
+Alternatively you can build the AAR from the command line by executing the following in the
+`android/` directory:
```
$ ./gradlew -Pfilament_dist_dir=../../out/android-release/filament assembleRelease
diff --git a/android/samples/transparent-view/.gitignore b/android/.gitignore
similarity index 58%
rename from android/samples/transparent-view/.gitignore
rename to android/.gitignore
index 298586a99a..95ab222d6a 100644
--- a/android/samples/transparent-view/.gitignore
+++ b/android/.gitignore
@@ -6,7 +6,4 @@
/.idea/caches
/.idea/gradle.xml
.DS_Store
-/build
-/captures
-/app/src/main/assets/materials/*.filamat
-.externalNativeBuild
+build/
diff --git a/android/build.gradle b/android/build.gradle
new file mode 100644
index 0000000000..74f7f333c9
--- /dev/null
+++ b/android/build.gradle
@@ -0,0 +1,57 @@
+// This script accepts the following parameters:
+//
+// filament_dist_dir
+// Path to the Filament distribution/install directory for Android
+// (produced by make/ninja install). This directory must contain lib/arm64-v8a/ etc.
+//
+// Example:
+// ./gradlew -Pfilament_dist_dir=../dist-android-release assembleRelease
+
+buildscript {
+ def filamentPath = file("../out/android-release/filament").absolutePath
+ if (project.hasProperty("filament_dist_dir")) {
+ filamentPath = file("$filament_dist_dir").absolutePath
+ }
+
+ ext.filamentPath = filamentPath
+
+ // Our minSdkVersion is actually 19, we lie and say 14 here so apps don't have
+ // to increase their minSdkVersion unnecessarily. It is however up to them to
+ // ensure they do not initialize Filament on API levels < 19.
+ ext.versions = [
+ 'minSdk': 14,
+ 'targetSdk': 29,
+ 'compileSdk': 29,
+ 'kotlin': '1.3.61',
+ ]
+
+ ext.deps = [
+ 'androidx': [
+ 'annotations': "androidx.annotation:annotation:1.0.0",
+ 'core': "androidx.core:core:1.1.0",
+ ],
+ 'kotlin': "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}"
+ ]
+
+ repositories {
+ mavenCentral()
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.5.3'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
+ }
+}
+
+subprojects { project ->
+ group = GROUP
+ version = VERSION_NAME
+
+ repositories {
+ mavenCentral()
+ google()
+ jcenter()
+ }
+}
diff --git a/android/filamat-android/build.gradle b/android/filamat-android/build.gradle
index 9e04bc2d86..d8e550c70c 100644
--- a/android/filamat-android/build.gradle
+++ b/android/filamat-android/build.gradle
@@ -1,55 +1,17 @@
-// This script accepts the following parameters:
-//
-// filament_dist_dir
-// Path to the Filament distribution/install directory for Android
-// (produced by make/ninja install). This directory must contain lib/arm64-v8a/ etc.
-//
-// Example:
-// ./gradlew -Pfilament_dist_dir=../../dist-android-release assembleRelease
-
-buildscript {
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-group = "com.google.android.filament"
-version = "1.3"
-
apply plugin: 'com.android.library'
-def filament_path = file("../../out/android-release/filament").absolutePath
-if (project.hasProperty("filament_dist_dir")) {
- filament_path = file("$filament_dist_dir").absolutePath
-}
-
android {
- compileSdkVersion 29
+ compileSdkVersion versions.compileSdk
defaultConfig {
- minSdkVersion 14
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
externalNativeBuild {
cmake {
arguments.add("-DANDROID_PIE=ON")
- arguments.add("-DANDROID_PLATFORM=android-19")
+ arguments.add("-DANDROID_PLATFORM=android-${versions.targetSdk}".toString())
arguments.add("-DANDROID_STL=c++_static")
- arguments.add("-DFILAMENT_DIST_DIR=${filament_path}".toString())
+ arguments.add("-DFILAMENT_DIST_DIR=${filamentPath}".toString())
cppFlags.add("-std=c++14")
if (project.hasProperty('extra_cmake_args')) {
arguments.add(extra_cmake_args)
@@ -58,13 +20,6 @@ android {
}
}
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
flavorDimensions "functionality"
productFlavors {
full {
@@ -101,6 +56,7 @@ android {
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation 'com.android.support:support-annotations:28.0.0'
+ implementation deps.androidx.annotations
}
+
+apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
diff --git a/android/filamat-android/gradle.properties b/android/filamat-android/gradle.properties
new file mode 100644
index 0000000000..f1d370f128
--- /dev/null
+++ b/android/filamat-android/gradle.properties
@@ -0,0 +1,3 @@
+POM_NAME=Filament Material Builder
+POM_ARTIFACT_ID=filamat-android-full
+POM_PACKAGING=aar
diff --git a/android/filamat-android/settings.gradle b/android/filamat-android/settings.gradle
deleted file mode 100644
index ed9224ce96..0000000000
--- a/android/filamat-android/settings.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * This file was generated by the Gradle 'init' task.
- *
- * The settings file is used to specify which projects to include in your build.
- *
- * Detailed information about configuring a multi-project build in Gradle can be found
- * in the user guide at https://docs.gradle.org/4.6/userguide/multi_project_builds.html
- */
-
-rootProject.name = 'filamat-android'
diff --git a/android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialBuilder.java b/android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialBuilder.java
index ca6b1bb3d4..4e0710baba 100644
--- a/android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialBuilder.java
+++ b/android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialBuilder.java
@@ -16,7 +16,7 @@
package com.google.android.filament.filamat;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import java.nio.ByteBuffer;
public class MaterialBuilder {
diff --git a/android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialPackage.java b/android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialPackage.java
index 2be7f6753f..fe00ff85a9 100644
--- a/android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialPackage.java
+++ b/android/filamat-android/src/main/java/com/google/android/filament/filamat/MaterialPackage.java
@@ -16,7 +16,7 @@
package com.google.android.filament.filamat;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import java.nio.ByteBuffer;
public class MaterialPackage {
diff --git a/android/filament-android/.idea/codeStyles/Project.xml b/android/filament-android/.idea/codeStyles/Project.xml
deleted file mode 100644
index ae78c113ff..0000000000
--- a/android/filament-android/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
-
-
-
- xmlns:android
-
- ^$
-
-
-
-
-
-
-
-
- xmlns:.*
-
- ^$
-
-
- BY_NAME
-
-
-
-
-
-
- .*:id
-
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
-
-
- .*:name
-
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
-
-
- name
-
- ^$
-
-
-
-
-
-
-
-
- style
-
- ^$
-
-
-
-
-
-
-
-
- .*
-
- ^$
-
-
- BY_NAME
-
-
-
-
-
-
- .*
-
- http://schemas.android.com/apk/res/android
-
-
- ANDROID_ATTRIBUTE_ORDER
-
-
-
-
-
-
- .*
-
- .*
-
-
- BY_NAME
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/filament-android/.idea/codeStyles/codeStyleConfig.xml b/android/filament-android/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a179b..0000000000
--- a/android/filament-android/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/android/filament-android/.idea/compiler.xml b/android/filament-android/.idea/compiler.xml
deleted file mode 100644
index 40ed93785d..0000000000
--- a/android/filament-android/.idea/compiler.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/filament-android/.idea/encodings.xml b/android/filament-android/.idea/encodings.xml
deleted file mode 100644
index 97626ba454..0000000000
--- a/android/filament-android/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/filament-android/.idea/misc.xml b/android/filament-android/.idea/misc.xml
deleted file mode 100644
index c0f68eddd7..0000000000
--- a/android/filament-android/.idea/misc.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/filament-android/.idea/modules.xml b/android/filament-android/.idea/modules.xml
deleted file mode 100644
index 3227efddab..0000000000
--- a/android/filament-android/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/filament-android/.idea/runConfigurations.xml b/android/filament-android/.idea/runConfigurations.xml
deleted file mode 100644
index 7f68460d8b..0000000000
--- a/android/filament-android/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/filament-android/.idea/vcs.xml b/android/filament-android/.idea/vcs.xml
deleted file mode 100644
index b2bdec2d71..0000000000
--- a/android/filament-android/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/filament-android/build.gradle b/android/filament-android/build.gradle
index 97bd4c621e..c5180178cf 100644
--- a/android/filament-android/build.gradle
+++ b/android/filament-android/build.gradle
@@ -1,58 +1,17 @@
-// This script accepts the following parameters:
-//
-// filament_dist_dir
-// Path to the Filament distribution/install directory for Android
-// (produced by make/ninja install). This directory must contain lib/arm64-v8a/ etc.
-//
-// Example:
-// ./gradlew -Pfilament_dist_dir=../../dist-android-release assembleRelease
-
-buildscript {
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-group = "com.google.android.filament"
-version = "1.3"
-
apply plugin: 'com.android.library'
-def filament_path = file("../../out/android-release/filament").absolutePath
-if (project.hasProperty("filament_dist_dir")) {
- filament_path = file("$filament_dist_dir").absolutePath
-}
-
android {
- compileSdkVersion 29
+ compileSdkVersion versions.compileSdk
defaultConfig {
- // Our minSdkVersion is actually 19, we lie and say 14 here so apps don't have
- // to increase their minSdkVersion unnecessarily. It is however up to them to
- // ensure they do not initialize Filament on API levels < 19.
- minSdkVersion 14
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
externalNativeBuild {
cmake {
arguments.add("-DANDROID_PIE=ON")
- arguments.add("-DANDROID_PLATFORM=android-19")
+ arguments.add("-DANDROID_PLATFORM=android-${versions.targetSdk}".toString())
arguments.add("-DANDROID_STL=c++_static")
- arguments.add("-DFILAMENT_DIST_DIR=${filament_path}".toString())
+ arguments.add("-DFILAMENT_DIST_DIR=${filamentPath}".toString())
cppFlags.add("-std=c++14")
if (project.hasProperty('extra_cmake_args')) {
arguments.add(extra_cmake_args)
@@ -61,13 +20,6 @@ android {
}
}
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
externalNativeBuild {
cmake {
path "CMakeLists.txt"
@@ -93,6 +45,7 @@ android {
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation 'com.android.support:support-annotations:28.0.0'
+ implementation deps.androidx.annotations
}
+
+apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
diff --git a/android/filament-android/gradle.properties b/android/filament-android/gradle.properties
new file mode 100644
index 0000000000..d880b34ca2
--- /dev/null
+++ b/android/filament-android/gradle.properties
@@ -0,0 +1,3 @@
+POM_NAME=Filament
+POM_ARTIFACT_ID=filament-android
+POM_PACKAGING=aar
diff --git a/android/filament-android/gradle/wrapper/gradle-wrapper.jar b/android/filament-android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 87b738cbd0..0000000000
Binary files a/android/filament-android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/filament-android/gradle/wrapper/gradle-wrapper.properties b/android/filament-android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index ee69dd68d1..0000000000
--- a/android/filament-android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/android/filament-android/gradlew b/android/filament-android/gradlew
deleted file mode 100755
index af6708ff22..0000000000
--- a/android/filament-android/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/filament-android/gradlew.bat b/android/filament-android/gradlew.bat
deleted file mode 100644
index 0f8d5937c4..0000000000
--- a/android/filament-android/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/filament-android/proguard-rules.pro b/android/filament-android/proguard-rules.pro
deleted file mode 100644
index 29e638377b..0000000000
--- a/android/filament-android/proguard-rules.pro
+++ /dev/null
@@ -1,22 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# JNI is an entry point that's hard to keep track of, so there's
-# an annotation to mark fields and methods used by native code.
-
-# Keep the annotations that proguard needs to process.
--keep class com.google.android.filament.proguard.UsedBy*
-
-# Just because native code accesses members of a class, does not mean that the
-# class itself needs to be annotated - only annotate classes that are
-# referenced themselves in native code.
--keep @com.google.android.filament.proguard.UsedBy* class * {
- ();
-}
--keepclassmembers class * {
- @com.google.android.filament.proguard.UsedBy* *;
-}
diff --git a/android/filament-android/settings.gradle b/android/filament-android/settings.gradle
deleted file mode 100644
index 48d67cc234..0000000000
--- a/android/filament-android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'filament-android'
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Asserts.java b/android/filament-android/src/main/java/com/google/android/filament/Asserts.java
index ab8ff4951d..8777b02da5 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Asserts.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Asserts.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.Size;
final class Asserts {
private Asserts() {
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Box.java b/android/filament-android/src/main/java/com/google/android/filament/Box.java
index b5fb057506..78fb352bcd 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Box.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Box.java
@@ -16,8 +16,8 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
-import android.support.annotation.Size;
+import androidx.annotation.NonNull;
+import androidx.annotation.Size;
/**
* An axis-aligned 3D box represented by its center and half-extent.
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Camera.java b/android/filament-android/src/main/java/com/google/android/filament/Camera.java
index 381e7b5bc6..8a2121bb3f 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Camera.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Camera.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.Size;
/**
* Camera represents the eye through which the scene is viewed.
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Colors.java b/android/filament-android/src/main/java/com/google/android/filament/Colors.java
index a38daca1a1..c52bc79e04 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Colors.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Colors.java
@@ -16,8 +16,8 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
-import android.support.annotation.Size;
+import androidx.annotation.NonNull;
+import androidx.annotation.Size;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Engine.java b/android/filament-android/src/main/java/com/google/android/filament/Engine.java
index 533fbfc172..135b8fb6d7 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Engine.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Engine.java
@@ -16,7 +16,7 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import com.google.android.filament.proguard.UsedByReflection;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/EntityManager.java b/android/filament-android/src/main/java/com/google/android/filament/EntityManager.java
index 0344eec7ff..cf83ecc41d 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/EntityManager.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/EntityManager.java
@@ -16,8 +16,8 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
import com.google.android.filament.proguard.UsedByReflection;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Fence.java b/android/filament-android/src/main/java/com/google/android/filament/Fence.java
index 66337a67bb..5d51515a49 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Fence.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Fence.java
@@ -15,7 +15,7 @@ package com.google.android.filament;
* limitations under the License.
*/
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
public class Fence {
private long mNativeObject;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/IndexBuffer.java b/android/filament-android/src/main/java/com/google/android/filament/IndexBuffer.java
index 153ea0123d..78b94577e5 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/IndexBuffer.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/IndexBuffer.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import java.nio.Buffer;
import java.nio.BufferOverflowException;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/IndirectLight.java b/android/filament-android/src/main/java/com/google/android/filament/IndirectLight.java
index 40874f0a03..4e3d0466a1 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/IndirectLight.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/IndirectLight.java
@@ -16,10 +16,10 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.Size;
import com.google.android.filament.proguard.UsedByReflection;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/LightManager.java b/android/filament-android/src/main/java/com/google/android/filament/LightManager.java
index 969487850e..837ff71e80 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/LightManager.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/LightManager.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.Size;
public class LightManager {
private long mNativeObject;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Material.java b/android/filament-android/src/main/java/com/google/android/filament/Material.java
index 6c677a904b..b88dea7143 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Material.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Material.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Size;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Size;
import com.google.android.filament.proguard.UsedByNative;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/MaterialInstance.java b/android/filament-android/src/main/java/com/google/android/filament/MaterialInstance.java
index 31145b8c77..f37b656159 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/MaterialInstance.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/MaterialInstance.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Size;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Size;
public class MaterialInstance {
private Material mMaterial;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/MathUtils.java b/android/filament-android/src/main/java/com/google/android/filament/MathUtils.java
index 76fd2c4ec0..03bf7fe5af 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/MathUtils.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/MathUtils.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Size;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Size;
public final class MathUtils {
private MathUtils() { }
diff --git a/android/filament-android/src/main/java/com/google/android/filament/NioUtils.java b/android/filament-android/src/main/java/com/google/android/filament/NioUtils.java
index d3649693a9..fdfe14cf78 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/NioUtils.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/NioUtils.java
@@ -16,7 +16,7 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import com.google.android.filament.proguard.UsedByNative;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Platform.java b/android/filament-android/src/main/java/com/google/android/filament/Platform.java
index 8984b74843..ecba0a174b 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Platform.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Platform.java
@@ -16,7 +16,7 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
abstract class Platform {
private static Platform mCurrentPlatform = null;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/RenderTarget.java b/android/filament-android/src/main/java/com/google/android/filament/RenderTarget.java
index c4f6bfbb7d..a7d5b03ff8 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/RenderTarget.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/RenderTarget.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
/**
* An offscreen render target that can be associated with a {@link View} and contains
diff --git a/android/filament-android/src/main/java/com/google/android/filament/RenderableManager.java b/android/filament-android/src/main/java/com/google/android/filament/RenderableManager.java
index 84e2708a3d..e12e41bbe2 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/RenderableManager.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/RenderableManager.java
@@ -16,10 +16,10 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.Size;
import java.nio.Buffer;
import java.nio.BufferOverflowException;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Renderer.java b/android/filament-android/src/main/java/com/google/android/filament/Renderer.java
index 06d344273e..71b6a6e7f3 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Renderer.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Renderer.java
@@ -16,8 +16,8 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
import java.nio.Buffer;
import java.nio.BufferOverflowException;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Scene.java b/android/filament-android/src/main/java/com/google/android/filament/Scene.java
index 180e7209e2..cb4d01dde8 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Scene.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Scene.java
@@ -16,7 +16,7 @@
package com.google.android.filament;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
/**
* A Scene is a flat container of {@link RenderableManager} and {@link LightManager}
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Skybox.java b/android/filament-android/src/main/java/com/google/android/filament/Skybox.java
index 572879a5b4..e6c757d6f1 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Skybox.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Skybox.java
@@ -16,8 +16,8 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
import com.google.android.filament.proguard.UsedByReflection;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Stream.java b/android/filament-android/src/main/java/com/google/android/filament/Stream.java
index 4e44c3525c..e5a1ba28a7 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Stream.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Stream.java
@@ -16,8 +16,8 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
import java.nio.Buffer;
import java.nio.BufferOverflowException;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/SwapChain.java b/android/filament-android/src/main/java/com/google/android/filament/SwapChain.java
index 7dc8d6f89c..3f16a81172 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/SwapChain.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/SwapChain.java
@@ -16,7 +16,7 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
/**
* A SwapChain represents an Operating System's native renderable surface.
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Texture.java b/android/filament-android/src/main/java/com/google/android/filament/Texture.java
index 85642839fc..d74949d3b8 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Texture.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Texture.java
@@ -16,10 +16,10 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.Size;
import com.google.android.filament.proguard.UsedByReflection;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/TextureSampler.java b/android/filament-android/src/main/java/com/google/android/filament/TextureSampler.java
index c4d277dd5b..4214742aa1 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/TextureSampler.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/TextureSampler.java
@@ -16,7 +16,7 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
/**
* TextureSampler defines how a texture is accessed.
diff --git a/android/filament-android/src/main/java/com/google/android/filament/TransformManager.java b/android/filament-android/src/main/java/com/google/android/filament/TransformManager.java
index fc34329fdb..3611ee6c1e 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/TransformManager.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/TransformManager.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.Size;
/**
* TransformManager is used to add transform components to entities.
diff --git a/android/filament-android/src/main/java/com/google/android/filament/VertexBuffer.java b/android/filament-android/src/main/java/com/google/android/filament/VertexBuffer.java
index c5ec5e8d1c..2b436e88f0 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/VertexBuffer.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/VertexBuffer.java
@@ -16,9 +16,9 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import java.nio.Buffer;
import java.nio.BufferOverflowException;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/View.java b/android/filament-android/src/main/java/com/google/android/filament/View.java
index 2ff681543a..032100703b 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/View.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/View.java
@@ -16,10 +16,10 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.Size;
import static com.google.android.filament.Colors.LinearColor;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/Viewport.java b/android/filament-android/src/main/java/com/google/android/filament/Viewport.java
index bb5a72dd4d..8058470856 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/Viewport.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/Viewport.java
@@ -16,7 +16,7 @@
package com.google.android.filament;
-import android.support.annotation.IntRange;
+import androidx.annotation.IntRange;
/**
* Specifies a rectangular region within a render target in terms of pixel coordinates.
diff --git a/android/filament-android/src/main/java/com/google/android/filament/android/TextureHelper.java b/android/filament-android/src/main/java/com/google/android/filament/android/TextureHelper.java
index 4759505412..c9dad31f5a 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/android/TextureHelper.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/android/TextureHelper.java
@@ -17,8 +17,8 @@
package com.google.android.filament.android;
import android.graphics.Bitmap;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
import com.google.android.filament.Engine;
import com.google.android.filament.Texture;
diff --git a/android/filament-android/src/main/java/com/google/android/filament/android/UiHelper.java b/android/filament-android/src/main/java/com/google/android/filament/android/UiHelper.java
index dfc25d739b..46eb0853af 100644
--- a/android/filament-android/src/main/java/com/google/android/filament/android/UiHelper.java
+++ b/android/filament-android/src/main/java/com/google/android/filament/android/UiHelper.java
@@ -19,8 +19,8 @@ package com.google.android.filament.android;
import android.graphics.PixelFormat;
import android.graphics.SurfaceTexture;
import android.os.Build;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import android.util.Log;
import android.view.Surface;
import android.view.SurfaceHolder;
diff --git a/android/gltfio-android/build.gradle b/android/gltfio-android/build.gradle
index 2f904336a6..3ad6b5f832 100644
--- a/android/gltfio-android/build.gradle
+++ b/android/gltfio-android/build.gradle
@@ -1,55 +1,17 @@
-// This script accepts the following parameters:
-//
-// filament_dist_dir
-// Path to the Filament distribution/install directory for Android
-// (produced by make/ninja install). This directory must contain lib/arm64-v8a/ etc.
-//
-// Example:
-// ./gradlew -Pfilament_dist_dir=../../dist-android-release assembleRelease
-
-buildscript {
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-group = "com.google.android.filament"
-version = "1.3"
-
apply plugin: 'com.android.library'
-def filament_path = file("../../out/android-release/filament").absolutePath
-if (project.hasProperty("filament_dist_dir")) {
- filament_path = file("$filament_dist_dir").absolutePath
-}
-
android {
- compileSdkVersion 29
+ compileSdkVersion versions.compileSdk
defaultConfig {
- minSdkVersion 14
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
externalNativeBuild {
cmake {
arguments.add("-DANDROID_PIE=ON")
- arguments.add("-DANDROID_PLATFORM=android-19")
+ arguments.add("-DANDROID_PLATFORM=android-${versions.targetSdk}".toString())
arguments.add("-DANDROID_STL=c++_static")
- arguments.add("-DFILAMENT_DIST_DIR=${filament_path}".toString())
+ arguments.add("-DFILAMENT_DIST_DIR=${filamentPath}".toString())
cppFlags.add("-std=c++14")
if (project.hasProperty('extra_cmake_args')) {
arguments.add(extra_cmake_args)
@@ -58,13 +20,6 @@ android {
}
}
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
externalNativeBuild {
cmake {
path "CMakeLists.txt"
@@ -84,7 +39,8 @@ android {
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation 'com.android.support:support-annotations:28.0.0'
- implementation 'com.google.android.filament:filament-android'
+ implementation deps.androidx.annotations
+ implementation project(':filament-android')
}
+
+apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
diff --git a/android/gltfio-android/gradle.properties b/android/gltfio-android/gradle.properties
new file mode 100644
index 0000000000..39d2ca590a
--- /dev/null
+++ b/android/gltfio-android/gradle.properties
@@ -0,0 +1,3 @@
+POM_NAME=Filament glTF Loader
+POM_ARTIFACT_ID=gltfio-android
+POM_PACKAGING=aar
diff --git a/android/gltfio-android/gradle/wrapper/gradle-wrapper.jar b/android/gltfio-android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 87b738cbd0..0000000000
Binary files a/android/gltfio-android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/gltfio-android/gradle/wrapper/gradle-wrapper.properties b/android/gltfio-android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index ee69dd68d1..0000000000
--- a/android/gltfio-android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/android/gltfio-android/gradlew b/android/gltfio-android/gradlew
deleted file mode 100755
index af6708ff22..0000000000
--- a/android/gltfio-android/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/gltfio-android/gradlew.bat b/android/gltfio-android/gradlew.bat
deleted file mode 100644
index 0f8d5937c4..0000000000
--- a/android/gltfio-android/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/gltfio-android/settings.gradle b/android/gltfio-android/settings.gradle
deleted file mode 100644
index 97cc9bd0f9..0000000000
--- a/android/gltfio-android/settings.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * This file was generated by the Gradle 'init' task.
- *
- * The settings file is used to specify which projects to include in your build.
- *
- * Detailed information about configuring a multi-project build in Gradle can be found
- * in the user guide at https://docs.gradle.org/4.6/userguide/multi_project_builds.html
- */
-
-includeBuild '../filament-android'
-
-rootProject.name = 'gltfio-android'
diff --git a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/Animator.java b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/Animator.java
index ad94ad2424..d98603e47e 100644
--- a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/Animator.java
+++ b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/Animator.java
@@ -16,9 +16,9 @@
package com.google.android.filament.gltfio;
-import android.support.annotation.IntRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.IntRange;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
/**
* Updates matrices according to glTF animation and skin definitions.
diff --git a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/AssetLoader.java b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/AssetLoader.java
index 83ed2fd881..7125969660 100644
--- a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/AssetLoader.java
+++ b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/AssetLoader.java
@@ -16,8 +16,8 @@
package com.google.android.filament.gltfio;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.google.android.filament.Engine;
import com.google.android.filament.EntityManager;
diff --git a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/FilamentAsset.java b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/FilamentAsset.java
index 00c260de17..74035b283c 100644
--- a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/FilamentAsset.java
+++ b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/FilamentAsset.java
@@ -16,7 +16,7 @@
package com.google.android.filament.gltfio;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import com.google.android.filament.Box;
import com.google.android.filament.Entity;
diff --git a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/KtxLoader.java b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/KtxLoader.java
index 6de30b350e..91a9f3cc9c 100644
--- a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/KtxLoader.java
+++ b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/KtxLoader.java
@@ -16,8 +16,8 @@
package com.google.android.filament.gltfio;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.google.android.filament.Engine;
import com.google.android.filament.IndirectLight;
diff --git a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/ResourceLoader.java b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/ResourceLoader.java
index 549800dfd0..1850f6f541 100644
--- a/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/ResourceLoader.java
+++ b/android/gltfio-android/src/main/java/com/google/android/filament/gltfio/ResourceLoader.java
@@ -16,7 +16,7 @@
package com.google.android.filament.gltfio;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import android.util.Log;
import com.google.android.filament.Engine;
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000000..86cf8266f9
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,16 @@
+GROUP=com.google.android.filament
+VERSION_NAME=1.4.3
+
+POM_DESCRIPTION=Real-time physically based rendering engine for Android.
+
+POM_URL=https://github.com/google/filament
+POM_SCM_URL=https://github.com/google/filament
+POM_SCM_CONNECTION=scm:git:git://github.com/google/filament.git
+POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/google/filament.git
+
+POM_LICENCE_NAME=The Apache Software License, Version 2.0
+POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
+POM_LICENCE_DIST=repo
+
+POM_DEVELOPER_ID=filament-team
+POM_DEVELOPER_NAME=Filament Team
diff --git a/android/build/filament-tasks.gradle b/android/gradle/filament-tasks.gradle
similarity index 76%
rename from android/build/filament-tasks.gradle
rename to android/gradle/filament-tasks.gradle
index b5fd4a59df..1f08efe4ad 100644
--- a/android/build/filament-tasks.gradle
+++ b/android/gradle/filament-tasks.gradle
@@ -12,28 +12,40 @@ import org.gradle.internal.os.OperatingSystem
import org.gradle.api.logging.Logger;
import org.gradle.api.logging.LogLevel;
-def filamentToolsPath = file("../../../../out/release/filament")
+ext.filamentToolsPath = file("../../../out/release/filament")
if (project.hasProperty("filament_tools_dir")) {
- filamentToolsPath = file("$filament_tools_dir")
+ ext.filamentToolsPath = file("$filament_tools_dir")
}
-List getBinaries(String name, File toolsPath) {
- def tool = ["/bin/${name}.exe", "/bin/${name}"]
- def toolFullPath = tool.collect { path -> Paths.get(toolsPath.absolutePath, path).toFile() }
+class TaskWithBinary extends DefaultTask {
+ private final String binaryName = name;
+ private File binaryPath = null;
- // Ensure that at least one matc binary and Filament library is present
- if (!toolFullPath.any { path -> file(path).exists() }) {
- throw new StopActionException("No ${name} binary could be found in " + toolsPath +
- "/bin. Ensure Filament has been built/installed before building this app.")
+ TaskWithBinary(String name) {
+ binaryName = name;
}
- return toolFullPath
-}
+ File getBinary() {
+ if (binaryPath == null) {
+ def fullPath = getBinaryPath(binaryName, project.ext.filamentToolsPath)
+ binaryPath = OperatingSystem.current().isWindows() ? fullPath[0] : fullPath[1]
+ }
+ return binaryPath
+ }
-ext.matcFullPath = getBinaries('matc', filamentToolsPath)
-ext.cmgenFullPath = getBinaries('cmgen', filamentToolsPath)
-ext.filameshFullPath = getBinaries('filamesh', filamentToolsPath)
-ext.resgenFullPath = getBinaries('resgen', filamentToolsPath)
+ private List getBinaryPath(String name, File toolsPath) {
+ def tool = ["/bin/${name}.exe", "/bin/${name}"]
+ def toolFullPath = tool.collect { path -> Paths.get(toolsPath.absolutePath, path).toFile() }
+
+ // Ensure that at least one matc binary and Filament library is present
+ if (!toolFullPath.any { path -> project.file(path).exists() }) {
+ throw new StopActionException("No ${name} binary could be found in " + toolsPath +
+ "/bin. Ensure Filament has been built/installed before building this app.")
+ }
+
+ return toolFullPath
+ }
+}
class LogOutputStream extends ByteArrayOutputStream {
private final Logger logger;
@@ -61,9 +73,7 @@ class LogOutputStream extends ByteArrayOutputStream {
// Custom task to compile material files using matc
// This task handles incremental builds
-class MaterialCompiler extends DefaultTask {
- File matcPath
-
+class MaterialCompiler extends TaskWithBinary {
@SuppressWarnings("GroovyUnusedDeclaration")
@InputDirectory
File inputDir
@@ -72,8 +82,7 @@ class MaterialCompiler extends DefaultTask {
File outputDir
MaterialCompiler() {
- matcPath = OperatingSystem.current().isWindows() ?
- project.ext.matcFullPath[0] : project.ext.matcFullPath[1]
+ super("matc")
}
@SuppressWarnings("GroovyUnusedDeclaration")
@@ -97,7 +106,7 @@ class MaterialCompiler extends DefaultTask {
project.exec {
standardOutput out
errorOutput err
- executable "${matcPath}"
+ executable "${getBinary()}"
args('-a', 'all', '-p', 'mobile', '-o', getOutputFile(file), file)
}
}
@@ -114,8 +123,7 @@ class MaterialCompiler extends DefaultTask {
// Custom task to process IBLs using cmgen
// This task handles incremental builds
-class IblGenerator extends DefaultTask {
- File cmgenPath
+class IblGenerator extends TaskWithBinary {
String cmgenArgs = null;
@SuppressWarnings("GroovyUnusedDeclaration")
@@ -126,8 +134,7 @@ class IblGenerator extends DefaultTask {
File outputDir
IblGenerator() {
- cmgenPath = OperatingSystem.current().isWindows() ?
- project.ext.cmgenFullPath[0] : project.ext.cmgenFullPath[1]
+ super("cmgen")
}
@SuppressWarnings("GroovyUnusedDeclaration")
@@ -150,7 +157,7 @@ class IblGenerator extends DefaultTask {
project.exec {
standardOutput out
errorOutput err
- executable "${cmgenPath}"
+ executable "${getBinary()}"
args('-x', outputDir, file)
}
@@ -178,9 +185,7 @@ class IblGenerator extends DefaultTask {
// Custom task to compile mesh files using filamesh
// This task handles incremental builds
-class MeshCompiler extends DefaultTask {
- File filameshPath
-
+class MeshCompiler extends TaskWithBinary {
@SuppressWarnings("GroovyUnusedDeclaration")
@InputFile
File inputFile
@@ -189,8 +194,7 @@ class MeshCompiler extends DefaultTask {
File outputDir
MeshCompiler() {
- filameshPath = OperatingSystem.current().isWindows() ?
- project.ext.filameshFullPath[0] : project.ext.filameshFullPath[1]
+ super("filamesh")
}
@SuppressWarnings("GroovyUnusedDeclaration")
@@ -213,7 +217,7 @@ class MeshCompiler extends DefaultTask {
project.exec {
standardOutput out
errorOutput err
- executable "${filameshPath}"
+ executable "${getBinary()}"
args(file, getOutputFile(file))
}
}
diff --git a/android/gradle/gradle-mvn-push.gradle b/android/gradle/gradle-mvn-push.gradle
new file mode 100644
index 0000000000..2707439cbc
--- /dev/null
+++ b/android/gradle/gradle-mvn-push.gradle
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2013 Chris Banes
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'maven'
+apply plugin: 'signing'
+
+version = VERSION_NAME
+group = GROUP
+
+def isReleaseBuild() {
+ return VERSION_NAME.contains("SNAPSHOT") == false
+}
+
+def getReleaseRepositoryUrl() {
+ return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
+ : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
+}
+
+def getSnapshotRepositoryUrl() {
+ return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
+ : "https://oss.sonatype.org/content/repositories/snapshots/"
+}
+
+def getRepositoryUsername() {
+ return hasProperty('SONATYPE_NEXUS_USERNAME') ? SONATYPE_NEXUS_USERNAME : ""
+}
+
+def getRepositoryPassword() {
+ return hasProperty('SONATYPE_NEXUS_PASSWORD') ? SONATYPE_NEXUS_PASSWORD : ""
+}
+
+def configurePom(pom) {
+ pom.groupId = GROUP
+ pom.artifactId = POM_ARTIFACT_ID
+ pom.version = VERSION_NAME
+
+ pom.project {
+ name POM_NAME
+ packaging POM_PACKAGING
+ description POM_DESCRIPTION
+ url POM_URL
+
+ scm {
+ url POM_SCM_URL
+ connection POM_SCM_CONNECTION
+ developerConnection POM_SCM_DEV_CONNECTION
+ }
+
+ licenses {
+ license {
+ name POM_LICENCE_NAME
+ url POM_LICENCE_URL
+ distribution POM_LICENCE_DIST
+ }
+ }
+
+ developers {
+ developer {
+ id POM_DEVELOPER_ID
+ name POM_DEVELOPER_NAME
+ }
+ }
+ }
+}
+
+afterEvaluate { project ->
+ uploadArchives {
+ repositories {
+ mavenDeployer {
+ beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
+
+ repository(url: getReleaseRepositoryUrl()) {
+ authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
+ }
+ snapshotRepository(url: getSnapshotRepositoryUrl()) {
+ authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
+ }
+
+ configurePom(pom)
+ }
+ }
+ }
+
+ tasks.create("installLocally", Upload) {
+ configuration = configurations.archives
+
+ repositories {
+ mavenDeployer {
+ repository(url: "file://${rootProject.buildDir}/localMaven")
+
+ configurePom(pom)
+ }
+ }
+ }
+
+ signing {
+ required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
+ sign configurations.archives
+ }
+
+ if (project.getPlugins().hasPlugin('com.android.application') ||
+ project.getPlugins().hasPlugin('com.android.library')) {
+ task install(type: Upload, dependsOn: assemble) {
+ repositories.mavenInstaller {
+ configuration = configurations.archives
+
+ configurePom(pom)
+ }
+ }
+
+ task androidJavadocs(type: Javadoc) {
+ source = android.sourceSets.main.java.source
+ classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+ }
+
+ task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
+ classifier = 'javadoc'
+ from androidJavadocs.destinationDir
+ }
+
+ task androidSourcesJar(type: Jar) {
+ classifier = 'sources'
+ from android.sourceSets.main.java.source
+ }
+ } else {
+ install {
+ repositories.mavenInstaller {
+ configurePom(pom)
+ }
+ }
+
+ task sourcesJar(type: Jar, dependsOn:classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+ }
+
+ task javadocJar(type: Jar, dependsOn:javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+ }
+ }
+
+ if (JavaVersion.current().isJava8Compatible()) {
+ allprojects {
+ tasks.withType(Javadoc) {
+ options.addStringOption('Xdoclint:none', '-quiet')
+ }
+ }
+ }
+
+ artifacts {
+ if (project.getPlugins().hasPlugin('com.android.application') ||
+ project.getPlugins().hasPlugin('com.android.library')) {
+ archives androidSourcesJar
+ archives androidJavadocsJar
+ } else {
+ archives sourcesJar
+ archives javadocJar
+ }
+ }
+}
diff --git a/android/filamat-android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from android/filamat-android/gradle/wrapper/gradle-wrapper.jar
rename to android/gradle/wrapper/gradle-wrapper.jar
diff --git a/android/filamat-android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from android/filamat-android/gradle/wrapper/gradle-wrapper.properties
rename to android/gradle/wrapper/gradle-wrapper.properties
diff --git a/android/filamat-android/gradlew b/android/gradlew
similarity index 100%
rename from android/filamat-android/gradlew
rename to android/gradlew
diff --git a/android/filamat-android/gradlew.bat b/android/gradlew.bat
similarity index 100%
rename from android/filamat-android/gradlew.bat
rename to android/gradlew.bat
diff --git a/android/samples/README.md b/android/samples/README.md
index 86074d1fe9..0f84589294 100644
--- a/android/samples/README.md
+++ b/android/samples/README.md
@@ -93,13 +93,13 @@ $ ./gradlew -Pfilament_tools_dir=../../dist-release assembleDebug
## Important: SDK location
-Either ensure your `ANDROID_HOME` environment variable is set or make sure each project contains a
-`local.properties` file with the `sdk.dir` property pointing to your installation of the Android
-SDK. This includes the project `filament-android` in the parent directory.
+Either ensure your `ANDROID_HOME` environment variable is set or make sure the root project
+contains a `local.properties` file with the `sdk.dir` property pointing to your installation of
+the Android SDK.
## Android Studio
-You must use Android Studio 3.3 or higher to open these projects.
+You must use Android Studio 3.5 or higher to open these projects.
## Compiling
diff --git a/android/samples/gltf-bloom/app/proguard-rules.pro b/android/samples/gltf-bloom/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/gltf-bloom/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/gltf-bloom/build.gradle b/android/samples/gltf-bloom/build.gradle
deleted file mode 100644
index 36b44cc2cd..0000000000
--- a/android/samples/gltf-bloom/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.3.11'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/gltf-bloom/gradle.properties b/android/samples/gltf-bloom/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/gltf-bloom/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/gltf-bloom/gradle/wrapper/gradle-wrapper.jar b/android/samples/gltf-bloom/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 87b738cbd0..0000000000
Binary files a/android/samples/gltf-bloom/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/gltf-bloom/gradle/wrapper/gradle-wrapper.properties b/android/samples/gltf-bloom/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index a1b08c8d8e..0000000000
--- a/android/samples/gltf-bloom/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Tue Jun 11 08:52:48 PDT 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/gltf-bloom/gradlew b/android/samples/gltf-bloom/gradlew
deleted file mode 100755
index af6708ff22..0000000000
--- a/android/samples/gltf-bloom/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/gltf-bloom/gradlew.bat b/android/samples/gltf-bloom/gradlew.bat
deleted file mode 100644
index 0f8d5937c4..0000000000
--- a/android/samples/gltf-bloom/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/gltf-bloom/settings.gradle b/android/samples/gltf-bloom/settings.gradle
deleted file mode 100644
index 66b3197386..0000000000
--- a/android/samples/gltf-bloom/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-includeBuild '../../filament-android'
-includeBuild '../../gltfio-android'
-
-include ':app'
diff --git a/android/samples/hello-camera/app/.gitignore b/android/samples/hello-camera/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/hello-camera/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/hello-camera/app/build.gradle b/android/samples/hello-camera/app/build.gradle
deleted file mode 100644
index 082a704c90..0000000000
--- a/android/samples/hello-camera/app/build.gradle
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMaterials {
- group 'Filament'
- description 'Compile materials'
-
- inputDir = file("src/main/materials")
- outputDir = file("src/main/assets/materials")
-}
-
-preBuild.dependsOn compileMaterials
-
-clean.doFirst {
- delete "src/main/assets"
-}
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.hellocam"
- minSdkVersion 26 // required for USAGE_GPU_SAMPLED_IMAGE
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
- implementation 'com.android.support:support-compat:28.0.0'
-}
diff --git a/android/samples/hello-camera/app/proguard-rules.pro b/android/samples/hello-camera/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/hello-camera/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/hello-camera/build.gradle b/android/samples/hello-camera/build.gradle
deleted file mode 100644
index 811c9ec35f..0000000000
--- a/android/samples/hello-camera/build.gradle
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/hello-camera/gradle.properties b/android/samples/hello-camera/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/hello-camera/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/hello-camera/gradle/wrapper/gradle-wrapper.jar b/android/samples/hello-camera/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 7a3265ee94..0000000000
Binary files a/android/samples/hello-camera/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/hello-camera/gradle/wrapper/gradle-wrapper.properties b/android/samples/hello-camera/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index d021d34adb..0000000000
--- a/android/samples/hello-camera/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jan 14 11:08:15 PST 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/hello-camera/gradlew b/android/samples/hello-camera/gradlew
deleted file mode 100755
index cccdd3d517..0000000000
--- a/android/samples/hello-camera/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/hello-camera/gradlew.bat b/android/samples/hello-camera/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/android/samples/hello-camera/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/hello-camera/settings.gradle b/android/samples/hello-camera/settings.gradle
deleted file mode 100644
index 466fef9302..0000000000
--- a/android/samples/hello-camera/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-includeBuild '../../filament-android'
-
-include ':app'
diff --git a/android/samples/hello-triangle/app/.gitignore b/android/samples/hello-triangle/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/hello-triangle/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/hello-triangle/app/build.gradle b/android/samples/hello-triangle/app/build.gradle
deleted file mode 100644
index bb12e8c252..0000000000
--- a/android/samples/hello-triangle/app/build.gradle
+++ /dev/null
@@ -1,84 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMaterials {
- group 'Filament'
- description 'Compile materials'
-
- inputDir = file("src/main/materials")
- outputDir = file("src/main/assets/materials")
-}
-
-preBuild.dependsOn compileMaterials
-
-clean.doFirst {
- delete "src/main/assets"
-}
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.hellotriangle"
- minSdkVersion 19
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
-}
diff --git a/android/samples/hello-triangle/app/proguard-rules.pro b/android/samples/hello-triangle/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/hello-triangle/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/hello-triangle/build.gradle b/android/samples/hello-triangle/build.gradle
deleted file mode 100644
index 8d482e6764..0000000000
--- a/android/samples/hello-triangle/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/hello-triangle/gradle.properties b/android/samples/hello-triangle/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/hello-triangle/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/hello-triangle/gradle/wrapper/gradle-wrapper.jar b/android/samples/hello-triangle/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 7a3265ee94..0000000000
Binary files a/android/samples/hello-triangle/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/hello-triangle/gradle/wrapper/gradle-wrapper.properties b/android/samples/hello-triangle/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index c8cf3f809c..0000000000
--- a/android/samples/hello-triangle/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jan 14 11:09:37 PST 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/hello-triangle/gradlew b/android/samples/hello-triangle/gradlew
deleted file mode 100755
index cccdd3d517..0000000000
--- a/android/samples/hello-triangle/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/hello-triangle/gradlew.bat b/android/samples/hello-triangle/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/android/samples/hello-triangle/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/hello-triangle/settings.gradle b/android/samples/hello-triangle/settings.gradle
deleted file mode 100644
index 466fef9302..0000000000
--- a/android/samples/hello-triangle/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-includeBuild '../../filament-android'
-
-include ':app'
diff --git a/android/samples/image-based-lighting/app/.gitignore b/android/samples/image-based-lighting/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/image-based-lighting/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/image-based-lighting/app/build.gradle b/android/samples/image-based-lighting/app/build.gradle
deleted file mode 100644
index ddeff1f5e0..0000000000
--- a/android/samples/image-based-lighting/app/build.gradle
+++ /dev/null
@@ -1,102 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMaterials {
- group 'Filament'
- description 'Compile materials'
-
- inputDir = file("src/main/materials")
- outputDir = file("src/main/assets/materials")
-}
-
-compileMesh {
- group 'Filament'
- description 'Compile mesh'
-
- inputFile = file("../../../../third_party/models/shader_ball/shader_ball.obj")
- outputDir = file("src/main/assets/models")
-}
-
-generateIbl {
- group 'Filament'
- description 'Generate IBL'
-
- inputFile = file("../../../../third_party/environments/flower_road_no_sun_2k.hdr")
- outputDir = file("src/main/assets/envs")
-}
-
-preBuild.dependsOn compileMaterials
-preBuild.dependsOn compileMesh
-preBuild.dependsOn generateIbl
-
-clean.doFirst {
- delete "src/main/assets"
-}
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.ibl"
- minSdkVersion 19
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
-}
diff --git a/android/samples/image-based-lighting/app/proguard-rules.pro b/android/samples/image-based-lighting/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/image-based-lighting/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/image-based-lighting/app/src/main/assets/models/shader_ball.filamesh b/android/samples/image-based-lighting/app/src/main/assets/models/shader_ball.filamesh
deleted file mode 100644
index 0079be3f4c..0000000000
Binary files a/android/samples/image-based-lighting/app/src/main/assets/models/shader_ball.filamesh and /dev/null differ
diff --git a/android/samples/image-based-lighting/build.gradle b/android/samples/image-based-lighting/build.gradle
deleted file mode 100644
index 8d482e6764..0000000000
--- a/android/samples/image-based-lighting/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/image-based-lighting/gradle.properties b/android/samples/image-based-lighting/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/image-based-lighting/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/image-based-lighting/gradle/wrapper/gradle-wrapper.jar b/android/samples/image-based-lighting/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 7a3265ee94..0000000000
Binary files a/android/samples/image-based-lighting/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/image-based-lighting/gradle/wrapper/gradle-wrapper.properties b/android/samples/image-based-lighting/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index d2def6343d..0000000000
--- a/android/samples/image-based-lighting/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Aug 23 11:38:34 PDT 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/image-based-lighting/gradlew b/android/samples/image-based-lighting/gradlew
deleted file mode 100755
index cccdd3d517..0000000000
--- a/android/samples/image-based-lighting/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/image-based-lighting/gradlew.bat b/android/samples/image-based-lighting/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/android/samples/image-based-lighting/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/image-based-lighting/settings.gradle b/android/samples/image-based-lighting/settings.gradle
deleted file mode 100644
index 466fef9302..0000000000
--- a/android/samples/image-based-lighting/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-includeBuild '../../filament-android'
-
-include ':app'
diff --git a/android/samples/lit-cube/app/.gitignore b/android/samples/lit-cube/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/lit-cube/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/lit-cube/app/build.gradle b/android/samples/lit-cube/app/build.gradle
deleted file mode 100644
index daa0ce1a11..0000000000
--- a/android/samples/lit-cube/app/build.gradle
+++ /dev/null
@@ -1,84 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMaterials {
- group 'Filament'
- description 'Compile materials'
-
- inputDir = file("src/main/materials")
- outputDir = file("src/main/assets/materials")
-}
-
-preBuild.dependsOn compileMaterials
-
-clean.doFirst {
- delete "src/main/assets"
-}
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.litcube"
- minSdkVersion 19
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
-}
diff --git a/android/samples/lit-cube/app/proguard-rules.pro b/android/samples/lit-cube/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/lit-cube/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/lit-cube/build.gradle b/android/samples/lit-cube/build.gradle
deleted file mode 100644
index 8d482e6764..0000000000
--- a/android/samples/lit-cube/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/lit-cube/gradle.properties b/android/samples/lit-cube/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/lit-cube/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/lit-cube/gradle/wrapper/gradle-wrapper.jar b/android/samples/lit-cube/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 7a3265ee94..0000000000
Binary files a/android/samples/lit-cube/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/lit-cube/gradle/wrapper/gradle-wrapper.properties b/android/samples/lit-cube/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index d021d34adb..0000000000
--- a/android/samples/lit-cube/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jan 14 11:08:15 PST 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/lit-cube/gradlew b/android/samples/lit-cube/gradlew
deleted file mode 100755
index cccdd3d517..0000000000
--- a/android/samples/lit-cube/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/lit-cube/gradlew.bat b/android/samples/lit-cube/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/android/samples/lit-cube/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/lit-cube/settings.gradle b/android/samples/lit-cube/settings.gradle
deleted file mode 100644
index 466fef9302..0000000000
--- a/android/samples/lit-cube/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-includeBuild '../../filament-android'
-
-include ':app'
diff --git a/android/samples/material-builder/app/.gitignore b/android/samples/material-builder/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/material-builder/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/material-builder/app/build.gradle b/android/samples/material-builder/app/build.gradle
deleted file mode 100644
index 70c0e69eb4..0000000000
--- a/android/samples/material-builder/app/build.gradle
+++ /dev/null
@@ -1,99 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMesh {
- group 'Filament'
- description 'Compile mesh'
-
- inputFile = file("../../../../third_party/models/shader_ball/shader_ball.obj")
- outputDir = file("src/main/assets/models")
-}
-
-generateIbl {
- group 'Filament'
- description 'Generate IBL'
-
- inputFile = file("../../../../third_party/environments/flower_road_no_sun_2k.hdr")
- outputDir = file("src/main/assets/envs")
-}
-
-preBuild.dependsOn compileMesh
-preBuild.dependsOn generateIbl
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.material_builder"
- minSdkVersion 19
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // The filamat library has two variants: full and lite. Here we default to the "full" variant.
- // Replace "full" with "lite" to use the filamat-lite variant, which has a smaller binary size
- // but comes with certain restrictions. See "Filamat Lite" in libs/filamat/README.md.
- defaultConfig {
- missingDimensionStrategy 'functionality', 'full'
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
-
- // Depend on Filamat
- implementation 'com.google.android.filament:filamat-android'
-}
diff --git a/android/samples/material-builder/app/proguard-rules.pro b/android/samples/material-builder/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/material-builder/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/material-builder/app/src/main/assets/models/shader_ball.filamesh b/android/samples/material-builder/app/src/main/assets/models/shader_ball.filamesh
deleted file mode 100644
index 0079be3f4c..0000000000
Binary files a/android/samples/material-builder/app/src/main/assets/models/shader_ball.filamesh and /dev/null differ
diff --git a/android/samples/material-builder/build.gradle b/android/samples/material-builder/build.gradle
deleted file mode 100644
index 8d482e6764..0000000000
--- a/android/samples/material-builder/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/material-builder/gradle.properties b/android/samples/material-builder/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/material-builder/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/material-builder/gradle/wrapper/gradle-wrapper.jar b/android/samples/material-builder/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 7a3265ee94..0000000000
Binary files a/android/samples/material-builder/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/material-builder/gradle/wrapper/gradle-wrapper.properties b/android/samples/material-builder/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index b312388df8..0000000000
--- a/android/samples/material-builder/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jan 14 11:08:47 PST 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/material-builder/gradlew b/android/samples/material-builder/gradlew
deleted file mode 100755
index cccdd3d517..0000000000
--- a/android/samples/material-builder/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/material-builder/gradlew.bat b/android/samples/material-builder/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/android/samples/material-builder/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/material-builder/settings.gradle b/android/samples/material-builder/settings.gradle
deleted file mode 100644
index 8758ae6e58..0000000000
--- a/android/samples/material-builder/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-includeBuild '../../filament-android'
-includeBuild '../../filamat-android'
-
-include ':app'
diff --git a/android/samples/gltf-bloom/app/.gitignore b/android/samples/sample-gltf-bloom/.gitignore
similarity index 100%
rename from android/samples/gltf-bloom/app/.gitignore
rename to android/samples/sample-gltf-bloom/.gitignore
diff --git a/android/samples/gltf-bloom/app/build.gradle b/android/samples/sample-gltf-bloom/build.gradle
similarity index 56%
rename from android/samples/gltf-bloom/app/build.gradle
rename to android/samples/sample-gltf-bloom/build.gradle
index c68b305f4f..ebdfbfea47 100644
--- a/android/samples/gltf-bloom/app/build.gradle
+++ b/android/samples/sample-gltf-bloom/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
-apply from: '../../../build/filament-tasks.gradle'
+apply from: '../../gradle/filament-tasks.gradle'
compileMaterials {
group 'Filament'
@@ -13,7 +13,7 @@ compileMaterials {
}
task copyMesh(type: Copy) {
- from file("../../../../third_party/models/lucy/lucy.glb")
+ from file("../../../third_party/models/lucy/lucy.glb")
into file("src/main/assets/models")
}
@@ -22,7 +22,7 @@ generateIbl {
description 'Generate IBL'
cmgenArgs = "--format=ktx --size=256 --extract-blur=0.1 --deploy=src/main/assets/envs/venetian_crossroads_2k"
- inputFile = file("../../../../third_party/environments/venetian_crossroads_2k.hdr")
+ inputFile = file("../../../third_party/environments/venetian_crossroads_2k.hdr")
outputDir = file("src/main/assets/envs")
}
@@ -35,20 +35,11 @@ clean.doFirst {
}
android {
- compileSdkVersion 29
+ compileSdkVersion versions.compileSdk
defaultConfig {
applicationId "com.google.android.filament.gltf"
- minSdkVersion 19
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
}
// We use the .filamat extension for materials compiled with matc
@@ -59,10 +50,7 @@ android {
}
dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
- implementation 'com.google.android.filament:gltfio-android'
+ implementation deps.kotlin
+ implementation project(':filament-android')
+ implementation project(':gltfio-android')
}
diff --git a/android/samples/gltf-bloom/app/src/main/AndroidManifest.xml b/android/samples/sample-gltf-bloom/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/AndroidManifest.xml
rename to android/samples/sample-gltf-bloom/src/main/AndroidManifest.xml
diff --git a/android/samples/sample-gltf-bloom/src/main/assets/models/lucy.glb b/android/samples/sample-gltf-bloom/src/main/assets/models/lucy.glb
new file mode 100644
index 0000000000..e7f43d1f25
Binary files /dev/null and b/android/samples/sample-gltf-bloom/src/main/assets/models/lucy.glb differ
diff --git a/android/samples/gltf-bloom/app/src/main/java/com/google/android/filament/gltf/Io.kt b/android/samples/sample-gltf-bloom/src/main/java/com/google/android/filament/gltf/Io.kt
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/java/com/google/android/filament/gltf/Io.kt
rename to android/samples/sample-gltf-bloom/src/main/java/com/google/android/filament/gltf/Io.kt
diff --git a/android/samples/gltf-bloom/app/src/main/java/com/google/android/filament/gltf/MainActivity.kt b/android/samples/sample-gltf-bloom/src/main/java/com/google/android/filament/gltf/MainActivity.kt
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/java/com/google/android/filament/gltf/MainActivity.kt
rename to android/samples/sample-gltf-bloom/src/main/java/com/google/android/filament/gltf/MainActivity.kt
diff --git a/android/samples/gltf-bloom/app/src/main/materials/blit.mat b/android/samples/sample-gltf-bloom/src/main/materials/blit.mat
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/materials/blit.mat
rename to android/samples/sample-gltf-bloom/src/main/materials/blit.mat
diff --git a/android/samples/gltf-bloom/app/src/main/materials/blur.mat b/android/samples/sample-gltf-bloom/src/main/materials/blur.mat
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/materials/blur.mat
rename to android/samples/sample-gltf-bloom/src/main/materials/blur.mat
diff --git a/android/samples/gltf-bloom/app/src/main/materials/mix.mat b/android/samples/sample-gltf-bloom/src/main/materials/mix.mat
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/materials/mix.mat
rename to android/samples/sample-gltf-bloom/src/main/materials/mix.mat
diff --git a/android/samples/gltf-bloom/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-gltf-bloom/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-gltf-bloom/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/gltf-bloom/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-gltf-bloom/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-gltf-bloom/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-gltf-bloom/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-gltf-bloom/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-gltf-bloom/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-gltf-bloom/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/gltf-bloom/app/src/main/res/values/colors.xml b/android/samples/sample-gltf-bloom/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/values/colors.xml
rename to android/samples/sample-gltf-bloom/src/main/res/values/colors.xml
diff --git a/android/samples/gltf-bloom/app/src/main/res/values/strings.xml b/android/samples/sample-gltf-bloom/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/values/strings.xml
rename to android/samples/sample-gltf-bloom/src/main/res/values/strings.xml
diff --git a/android/samples/gltf-bloom/app/src/main/res/values/styles.xml b/android/samples/sample-gltf-bloom/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/gltf-bloom/app/src/main/res/values/styles.xml
rename to android/samples/sample-gltf-bloom/src/main/res/values/styles.xml
diff --git a/android/samples/gltf-bloom/.gitignore b/android/samples/sample-hello-camera/.gitignore
similarity index 100%
rename from android/samples/gltf-bloom/.gitignore
rename to android/samples/sample-hello-camera/.gitignore
diff --git a/android/samples/sample-hello-camera/build.gradle b/android/samples/sample-hello-camera/build.gradle
new file mode 100644
index 0000000000..a468548fcd
--- /dev/null
+++ b/android/samples/sample-hello-camera/build.gradle
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMaterials {
+ group 'Filament'
+ description 'Compile materials'
+
+ inputDir = file("src/main/materials")
+ outputDir = file("src/main/assets/materials")
+}
+
+preBuild.dependsOn compileMaterials
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.hellocamera"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat', 'ktx'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation deps.androidx.core
+ implementation project(':filament-android')
+}
diff --git a/android/samples/hello-camera/app/src/main/AndroidManifest.xml b/android/samples/sample-hello-camera/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/hello-camera/app/src/main/AndroidManifest.xml
rename to android/samples/sample-hello-camera/src/main/AndroidManifest.xml
diff --git a/android/samples/hello-camera/app/src/main/java/com/google/android/filament/hellocam/CameraHelper.kt b/android/samples/sample-hello-camera/src/main/java/com/google/android/filament/hellocam/CameraHelper.kt
similarity index 99%
rename from android/samples/hello-camera/app/src/main/java/com/google/android/filament/hellocam/CameraHelper.kt
rename to android/samples/sample-hello-camera/src/main/java/com/google/android/filament/hellocam/CameraHelper.kt
index 06d0b20c1a..decd58ec4a 100644
--- a/android/samples/hello-camera/app/src/main/java/com/google/android/filament/hellocam/CameraHelper.kt
+++ b/android/samples/sample-hello-camera/src/main/java/com/google/android/filament/hellocam/CameraHelper.kt
@@ -23,10 +23,10 @@ import android.graphics.SurfaceTexture
import android.hardware.camera2.*
import android.os.Handler
import android.os.HandlerThread
-import android.support.v4.content.ContextCompat
import android.util.Log
import android.util.Size
import android.view.Surface
+import androidx.core.content.ContextCompat
import android.Manifest
import android.graphics.ImageFormat
diff --git a/android/samples/hello-camera/app/src/main/java/com/google/android/filament/hellocam/MainActivity.kt b/android/samples/sample-hello-camera/src/main/java/com/google/android/filament/hellocam/MainActivity.kt
similarity index 99%
rename from android/samples/hello-camera/app/src/main/java/com/google/android/filament/hellocam/MainActivity.kt
rename to android/samples/sample-hello-camera/src/main/java/com/google/android/filament/hellocam/MainActivity.kt
index 476a6985ea..9c0e389fe5 100644
--- a/android/samples/hello-camera/app/src/main/java/com/google/android/filament/hellocam/MainActivity.kt
+++ b/android/samples/sample-hello-camera/src/main/java/com/google/android/filament/hellocam/MainActivity.kt
@@ -20,11 +20,11 @@ import android.animation.ValueAnimator
import android.app.Activity
import android.opengl.Matrix
import android.os.Bundle
-import android.support.v4.app.ActivityCompat
import android.view.Choreographer
import android.view.Surface
import android.view.SurfaceView
import android.view.animation.LinearInterpolator
+import androidx.core.app.ActivityCompat
import com.google.android.filament.*
import com.google.android.filament.RenderableManager.*
diff --git a/android/samples/hello-camera/app/src/main/materials/lit.mat b/android/samples/sample-hello-camera/src/main/materials/lit.mat
similarity index 100%
rename from android/samples/hello-camera/app/src/main/materials/lit.mat
rename to android/samples/sample-hello-camera/src/main/materials/lit.mat
diff --git a/android/samples/hello-camera/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-hello-camera/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-hello-camera/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/hello-camera/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-hello-camera/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-hello-camera/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-hello-camera/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-hello-camera/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-hello-camera/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-hello-camera/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-hello-camera/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-hello-camera/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-hello-camera/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-hello-camera/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-hello-camera/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-hello-camera/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-hello-camera/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-hello-camera/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-hello-camera/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/hello-camera/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-hello-camera/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-hello-camera/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/hello-camera/app/src/main/res/values/colors.xml b/android/samples/sample-hello-camera/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/values/colors.xml
rename to android/samples/sample-hello-camera/src/main/res/values/colors.xml
diff --git a/android/samples/hello-camera/app/src/main/res/values/strings.xml b/android/samples/sample-hello-camera/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/values/strings.xml
rename to android/samples/sample-hello-camera/src/main/res/values/strings.xml
diff --git a/android/samples/hello-camera/app/src/main/res/values/styles.xml b/android/samples/sample-hello-camera/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/hello-camera/app/src/main/res/values/styles.xml
rename to android/samples/sample-hello-camera/src/main/res/values/styles.xml
diff --git a/android/samples/hello-camera/.gitignore b/android/samples/sample-hello-triangle/.gitignore
similarity index 100%
rename from android/samples/hello-camera/.gitignore
rename to android/samples/sample-hello-triangle/.gitignore
diff --git a/android/samples/sample-hello-triangle/build.gradle b/android/samples/sample-hello-triangle/build.gradle
new file mode 100644
index 0000000000..784a249e73
--- /dev/null
+++ b/android/samples/sample-hello-triangle/build.gradle
@@ -0,0 +1,39 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMaterials {
+ group 'Filament'
+ description 'Compile materials'
+
+ inputDir = file("src/main/materials")
+ outputDir = file("src/main/assets/materials")
+}
+
+preBuild.dependsOn compileMaterials
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.hellotriangle"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat', 'ktx'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation project(':filament-android')
+}
diff --git a/android/samples/hello-triangle/app/src/main/AndroidManifest.xml b/android/samples/sample-hello-triangle/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/AndroidManifest.xml
rename to android/samples/sample-hello-triangle/src/main/AndroidManifest.xml
diff --git a/android/samples/hello-triangle/app/src/main/java/com/google/android/filament/hellotriangle/MainActivity.kt b/android/samples/sample-hello-triangle/src/main/java/com/google/android/filament/hellotriangle/MainActivity.kt
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/java/com/google/android/filament/hellotriangle/MainActivity.kt
rename to android/samples/sample-hello-triangle/src/main/java/com/google/android/filament/hellotriangle/MainActivity.kt
diff --git a/android/samples/hello-triangle/app/src/main/materials/baked_color.mat b/android/samples/sample-hello-triangle/src/main/materials/baked_color.mat
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/materials/baked_color.mat
rename to android/samples/sample-hello-triangle/src/main/materials/baked_color.mat
diff --git a/android/samples/hello-triangle/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-hello-triangle/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-hello-triangle/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/hello-triangle/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-hello-triangle/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-hello-triangle/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-hello-triangle/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-hello-triangle/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/hello-triangle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-hello-triangle/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-hello-triangle/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/hello-triangle/app/src/main/res/values/colors.xml b/android/samples/sample-hello-triangle/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/values/colors.xml
rename to android/samples/sample-hello-triangle/src/main/res/values/colors.xml
diff --git a/android/samples/hello-triangle/app/src/main/res/values/strings.xml b/android/samples/sample-hello-triangle/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/values/strings.xml
rename to android/samples/sample-hello-triangle/src/main/res/values/strings.xml
diff --git a/android/samples/hello-triangle/app/src/main/res/values/styles.xml b/android/samples/sample-hello-triangle/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/hello-triangle/app/src/main/res/values/styles.xml
rename to android/samples/sample-hello-triangle/src/main/res/values/styles.xml
diff --git a/android/samples/image-based-lighting/.gitignore b/android/samples/sample-image-based-lighting/.gitignore
similarity index 100%
rename from android/samples/image-based-lighting/.gitignore
rename to android/samples/sample-image-based-lighting/.gitignore
diff --git a/android/samples/sample-image-based-lighting/build.gradle b/android/samples/sample-image-based-lighting/build.gradle
new file mode 100644
index 0000000000..1c38e7585d
--- /dev/null
+++ b/android/samples/sample-image-based-lighting/build.gradle
@@ -0,0 +1,57 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMaterials {
+ group 'Filament'
+ description 'Compile materials'
+
+ inputDir = file("src/main/materials")
+ outputDir = file("src/main/assets/materials")
+}
+
+compileMesh {
+ group 'Filament'
+ description 'Compile mesh'
+
+ inputFile = file("../../../third_party/models/shader_ball/shader_ball.obj")
+ outputDir = file("src/main/assets/models")
+}
+
+generateIbl {
+ group 'Filament'
+ description 'Generate IBL'
+
+ inputFile = file("../../../third_party/environments/flower_road_no_sun_2k.hdr")
+ outputDir = file("src/main/assets/envs")
+}
+
+preBuild.dependsOn compileMaterials
+preBuild.dependsOn compileMesh
+preBuild.dependsOn generateIbl
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.ibl"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat', 'ktx'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation project(':filament-android')
+}
diff --git a/android/samples/image-based-lighting/app/src/main/AndroidManifest.xml b/android/samples/sample-image-based-lighting/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/AndroidManifest.xml
rename to android/samples/sample-image-based-lighting/src/main/AndroidManifest.xml
diff --git a/android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/IblLoader.kt b/android/samples/sample-image-based-lighting/src/main/java/com/google/android/filament/ibl/IblLoader.kt
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/IblLoader.kt
rename to android/samples/sample-image-based-lighting/src/main/java/com/google/android/filament/ibl/IblLoader.kt
diff --git a/android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/Io.kt b/android/samples/sample-image-based-lighting/src/main/java/com/google/android/filament/ibl/Io.kt
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/Io.kt
rename to android/samples/sample-image-based-lighting/src/main/java/com/google/android/filament/ibl/Io.kt
diff --git a/android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/MainActivity.kt b/android/samples/sample-image-based-lighting/src/main/java/com/google/android/filament/ibl/MainActivity.kt
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/MainActivity.kt
rename to android/samples/sample-image-based-lighting/src/main/java/com/google/android/filament/ibl/MainActivity.kt
diff --git a/android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/MeshLoader.kt b/android/samples/sample-image-based-lighting/src/main/java/com/google/android/filament/ibl/MeshLoader.kt
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/java/com/google/android/filament/ibl/MeshLoader.kt
rename to android/samples/sample-image-based-lighting/src/main/java/com/google/android/filament/ibl/MeshLoader.kt
diff --git a/android/samples/image-based-lighting/app/src/main/materials/clear_coat.mat b/android/samples/sample-image-based-lighting/src/main/materials/clear_coat.mat
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/materials/clear_coat.mat
rename to android/samples/sample-image-based-lighting/src/main/materials/clear_coat.mat
diff --git a/android/samples/image-based-lighting/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-image-based-lighting/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-image-based-lighting/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/image-based-lighting/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-image-based-lighting/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-image-based-lighting/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-image-based-lighting/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-image-based-lighting/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-image-based-lighting/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-image-based-lighting/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/image-based-lighting/app/src/main/res/values/colors.xml b/android/samples/sample-image-based-lighting/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/values/colors.xml
rename to android/samples/sample-image-based-lighting/src/main/res/values/colors.xml
diff --git a/android/samples/image-based-lighting/app/src/main/res/values/strings.xml b/android/samples/sample-image-based-lighting/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/values/strings.xml
rename to android/samples/sample-image-based-lighting/src/main/res/values/strings.xml
diff --git a/android/samples/image-based-lighting/app/src/main/res/values/styles.xml b/android/samples/sample-image-based-lighting/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/image-based-lighting/app/src/main/res/values/styles.xml
rename to android/samples/sample-image-based-lighting/src/main/res/values/styles.xml
diff --git a/android/samples/hello-triangle/.gitignore b/android/samples/sample-lit-cube/.gitignore
similarity index 100%
rename from android/samples/hello-triangle/.gitignore
rename to android/samples/sample-lit-cube/.gitignore
diff --git a/android/samples/sample-lit-cube/build.gradle b/android/samples/sample-lit-cube/build.gradle
new file mode 100644
index 0000000000..95b8e284e9
--- /dev/null
+++ b/android/samples/sample-lit-cube/build.gradle
@@ -0,0 +1,38 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMaterials {
+ group 'Filament'
+ description 'Compile materials'
+
+ inputDir = file("src/main/materials")
+ outputDir = file("src/main/assets/materials")
+}
+
+preBuild.dependsOn compileMaterials
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.litcube"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat', 'ktx'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation project(':filament-android')
+}
diff --git a/android/samples/lit-cube/app/src/main/AndroidManifest.xml b/android/samples/sample-lit-cube/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/lit-cube/app/src/main/AndroidManifest.xml
rename to android/samples/sample-lit-cube/src/main/AndroidManifest.xml
diff --git a/android/samples/lit-cube/app/src/main/java/com/google/android/filament/litcube/MainActivity.kt b/android/samples/sample-lit-cube/src/main/java/com/google/android/filament/litcube/MainActivity.kt
similarity index 100%
rename from android/samples/lit-cube/app/src/main/java/com/google/android/filament/litcube/MainActivity.kt
rename to android/samples/sample-lit-cube/src/main/java/com/google/android/filament/litcube/MainActivity.kt
diff --git a/android/samples/lit-cube/app/src/main/materials/lit.mat b/android/samples/sample-lit-cube/src/main/materials/lit.mat
similarity index 100%
rename from android/samples/lit-cube/app/src/main/materials/lit.mat
rename to android/samples/sample-lit-cube/src/main/materials/lit.mat
diff --git a/android/samples/lit-cube/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-lit-cube/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-lit-cube/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/lit-cube/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-lit-cube/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-lit-cube/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-lit-cube/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-lit-cube/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-lit-cube/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-lit-cube/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-lit-cube/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-lit-cube/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-lit-cube/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-lit-cube/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-lit-cube/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-lit-cube/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-lit-cube/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-lit-cube/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-lit-cube/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/lit-cube/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-lit-cube/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-lit-cube/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/lit-cube/app/src/main/res/values/colors.xml b/android/samples/sample-lit-cube/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/values/colors.xml
rename to android/samples/sample-lit-cube/src/main/res/values/colors.xml
diff --git a/android/samples/lit-cube/app/src/main/res/values/strings.xml b/android/samples/sample-lit-cube/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/values/strings.xml
rename to android/samples/sample-lit-cube/src/main/res/values/strings.xml
diff --git a/android/samples/lit-cube/app/src/main/res/values/styles.xml b/android/samples/sample-lit-cube/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/lit-cube/app/src/main/res/values/styles.xml
rename to android/samples/sample-lit-cube/src/main/res/values/styles.xml
diff --git a/android/samples/material-builder/.gitignore b/android/samples/sample-material-builder/.gitignore
similarity index 100%
rename from android/samples/material-builder/.gitignore
rename to android/samples/sample-material-builder/.gitignore
diff --git a/android/samples/material-builder/README.md b/android/samples/sample-material-builder/README.md
similarity index 100%
rename from android/samples/material-builder/README.md
rename to android/samples/sample-material-builder/README.md
diff --git a/android/samples/sample-material-builder/build.gradle b/android/samples/sample-material-builder/build.gradle
new file mode 100644
index 0000000000..0a5f2bcf5a
--- /dev/null
+++ b/android/samples/sample-material-builder/build.gradle
@@ -0,0 +1,56 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMesh {
+ group 'Filament'
+ description 'Compile mesh'
+
+ inputFile = file("../../../third_party/models/shader_ball/shader_ball.obj")
+ outputDir = file("src/main/assets/models")
+}
+
+generateIbl {
+ group 'Filament'
+ description 'Generate IBL'
+
+ inputFile = file("../../../third_party/environments/flower_road_no_sun_2k.hdr")
+ outputDir = file("src/main/assets/envs")
+}
+
+preBuild.dependsOn compileMesh
+preBuild.dependsOn generateIbl
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.material_builder"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // The filamat library has two variants: full and lite. Here we default to the "full" variant.
+ // Replace "full" with "lite" to use the filamat-lite variant, which has a smaller binary size
+ // but comes with certain restrictions. See "Filamat Lite" in libs/filamat/README.md.
+ defaultConfig {
+ missingDimensionStrategy 'functionality', 'full'
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation project(':filament-android')
+ implementation project(':filamat-android')
+}
diff --git a/android/samples/material-builder/app/src/main/AndroidManifest.xml b/android/samples/sample-material-builder/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/material-builder/app/src/main/AndroidManifest.xml
rename to android/samples/sample-material-builder/src/main/AndroidManifest.xml
diff --git a/android/samples/material-builder/app/src/main/java/com/google/android/filament/material_builder/IblLoader.kt b/android/samples/sample-material-builder/src/main/java/com/google/android/filament/material_builder/IblLoader.kt
similarity index 100%
rename from android/samples/material-builder/app/src/main/java/com/google/android/filament/material_builder/IblLoader.kt
rename to android/samples/sample-material-builder/src/main/java/com/google/android/filament/material_builder/IblLoader.kt
diff --git a/android/samples/material-builder/app/src/main/java/com/google/android/filament/material_builder/Io.kt b/android/samples/sample-material-builder/src/main/java/com/google/android/filament/material_builder/Io.kt
similarity index 100%
rename from android/samples/material-builder/app/src/main/java/com/google/android/filament/material_builder/Io.kt
rename to android/samples/sample-material-builder/src/main/java/com/google/android/filament/material_builder/Io.kt
diff --git a/android/samples/material-builder/app/src/main/java/com/google/android/filament/material_builder/MainActivity.kt b/android/samples/sample-material-builder/src/main/java/com/google/android/filament/material_builder/MainActivity.kt
similarity index 100%
rename from android/samples/material-builder/app/src/main/java/com/google/android/filament/material_builder/MainActivity.kt
rename to android/samples/sample-material-builder/src/main/java/com/google/android/filament/material_builder/MainActivity.kt
diff --git a/android/samples/material-builder/app/src/main/java/com/google/android/filament/material_builder/MeshLoader.kt b/android/samples/sample-material-builder/src/main/java/com/google/android/filament/material_builder/MeshLoader.kt
similarity index 100%
rename from android/samples/material-builder/app/src/main/java/com/google/android/filament/material_builder/MeshLoader.kt
rename to android/samples/sample-material-builder/src/main/java/com/google/android/filament/material_builder/MeshLoader.kt
diff --git a/android/samples/material-builder/app/src/main/materials/clear_coat.mat b/android/samples/sample-material-builder/src/main/materials/clear_coat.mat
similarity index 100%
rename from android/samples/material-builder/app/src/main/materials/clear_coat.mat
rename to android/samples/sample-material-builder/src/main/materials/clear_coat.mat
diff --git a/android/samples/material-builder/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-material-builder/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-material-builder/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/material-builder/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-material-builder/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-material-builder/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-material-builder/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-material-builder/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-material-builder/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-material-builder/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-material-builder/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-material-builder/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-material-builder/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-material-builder/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-material-builder/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-material-builder/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-material-builder/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-material-builder/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-material-builder/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/material-builder/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-material-builder/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-material-builder/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/material-builder/app/src/main/res/values/colors.xml b/android/samples/sample-material-builder/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/values/colors.xml
rename to android/samples/sample-material-builder/src/main/res/values/colors.xml
diff --git a/android/samples/material-builder/app/src/main/res/values/strings.xml b/android/samples/sample-material-builder/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/values/strings.xml
rename to android/samples/sample-material-builder/src/main/res/values/strings.xml
diff --git a/android/samples/material-builder/app/src/main/res/values/styles.xml b/android/samples/sample-material-builder/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/material-builder/app/src/main/res/values/styles.xml
rename to android/samples/sample-material-builder/src/main/res/values/styles.xml
diff --git a/android/samples/lit-cube/.gitignore b/android/samples/sample-stream-test/.gitignore
similarity index 100%
rename from android/samples/lit-cube/.gitignore
rename to android/samples/sample-stream-test/.gitignore
diff --git a/android/samples/sample-stream-test/build.gradle b/android/samples/sample-stream-test/build.gradle
new file mode 100644
index 0000000000..d39a51b599
--- /dev/null
+++ b/android/samples/sample-stream-test/build.gradle
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMaterials {
+ group 'Filament'
+ description 'Compile materials'
+
+ inputDir = file("src/main/materials")
+ outputDir = file("src/main/assets/materials")
+}
+
+preBuild.dependsOn compileMaterials
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.streamtest"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat', 'ktx'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation deps.androidx.core
+ implementation project(':filament-android')
+}
diff --git a/android/samples/stream-test/app/src/main/AndroidManifest.xml b/android/samples/sample-stream-test/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/stream-test/app/src/main/AndroidManifest.xml
rename to android/samples/sample-stream-test/src/main/AndroidManifest.xml
diff --git a/android/samples/stream-test/app/src/main/java/com/google/android/filament/streamtest/MainActivity.kt b/android/samples/sample-stream-test/src/main/java/com/google/android/filament/streamtest/MainActivity.kt
similarity index 99%
rename from android/samples/stream-test/app/src/main/java/com/google/android/filament/streamtest/MainActivity.kt
rename to android/samples/sample-stream-test/src/main/java/com/google/android/filament/streamtest/MainActivity.kt
index d28bb6acfd..28ec5a6347 100644
--- a/android/samples/stream-test/app/src/main/java/com/google/android/filament/streamtest/MainActivity.kt
+++ b/android/samples/sample-stream-test/src/main/java/com/google/android/filament/streamtest/MainActivity.kt
@@ -19,10 +19,10 @@ package com.google.android.filament.streamtest
import android.annotation.SuppressLint
import android.app.Activity
import android.os.Bundle
-import android.support.v4.app.ActivityCompat
import android.view.Choreographer
import android.view.Surface
import android.view.SurfaceView
+import androidx.core.app.ActivityCompat
import com.google.android.filament.*
import com.google.android.filament.RenderableManager.*
diff --git a/android/samples/stream-test/app/src/main/java/com/google/android/filament/streamtest/StreamHelper.kt b/android/samples/sample-stream-test/src/main/java/com/google/android/filament/streamtest/StreamHelper.kt
similarity index 100%
rename from android/samples/stream-test/app/src/main/java/com/google/android/filament/streamtest/StreamHelper.kt
rename to android/samples/sample-stream-test/src/main/java/com/google/android/filament/streamtest/StreamHelper.kt
diff --git a/android/samples/stream-test/app/src/main/materials/lit.mat b/android/samples/sample-stream-test/src/main/materials/lit.mat
similarity index 100%
rename from android/samples/stream-test/app/src/main/materials/lit.mat
rename to android/samples/sample-stream-test/src/main/materials/lit.mat
diff --git a/android/samples/stream-test/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-stream-test/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-stream-test/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/stream-test/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-stream-test/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-stream-test/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-stream-test/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-stream-test/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-stream-test/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-stream-test/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-stream-test/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-stream-test/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-stream-test/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-stream-test/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-stream-test/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-stream-test/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-stream-test/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-stream-test/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-stream-test/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/stream-test/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-stream-test/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-stream-test/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/stream-test/app/src/main/res/values/colors.xml b/android/samples/sample-stream-test/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/values/colors.xml
rename to android/samples/sample-stream-test/src/main/res/values/colors.xml
diff --git a/android/samples/stream-test/app/src/main/res/values/strings.xml b/android/samples/sample-stream-test/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/values/strings.xml
rename to android/samples/sample-stream-test/src/main/res/values/strings.xml
diff --git a/android/samples/stream-test/app/src/main/res/values/styles.xml b/android/samples/sample-stream-test/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/stream-test/app/src/main/res/values/styles.xml
rename to android/samples/sample-stream-test/src/main/res/values/styles.xml
diff --git a/android/samples/stream-test/.gitignore b/android/samples/sample-texture-view/.gitignore
similarity index 100%
rename from android/samples/stream-test/.gitignore
rename to android/samples/sample-texture-view/.gitignore
diff --git a/android/samples/sample-texture-view/build.gradle b/android/samples/sample-texture-view/build.gradle
new file mode 100644
index 0000000000..21ed924d16
--- /dev/null
+++ b/android/samples/sample-texture-view/build.gradle
@@ -0,0 +1,39 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMaterials {
+ group 'Filament'
+ description 'Compile materials'
+
+ inputDir = file("src/main/materials")
+ outputDir = file("src/main/assets/materials")
+}
+
+preBuild.dependsOn compileMaterials
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.textureview"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat', 'ktx'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation project(':filament-android')
+}
diff --git a/android/samples/texture-view/app/src/main/AndroidManifest.xml b/android/samples/sample-texture-view/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/texture-view/app/src/main/AndroidManifest.xml
rename to android/samples/sample-texture-view/src/main/AndroidManifest.xml
diff --git a/android/samples/texture-view/app/src/main/java/com/google/android/filament/textureview/MainActivity.kt b/android/samples/sample-texture-view/src/main/java/com/google/android/filament/textureview/MainActivity.kt
similarity index 100%
rename from android/samples/texture-view/app/src/main/java/com/google/android/filament/textureview/MainActivity.kt
rename to android/samples/sample-texture-view/src/main/java/com/google/android/filament/textureview/MainActivity.kt
diff --git a/android/samples/texture-view/app/src/main/materials/baked_color.mat b/android/samples/sample-texture-view/src/main/materials/baked_color.mat
similarity index 100%
rename from android/samples/texture-view/app/src/main/materials/baked_color.mat
rename to android/samples/sample-texture-view/src/main/materials/baked_color.mat
diff --git a/android/samples/texture-view/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-texture-view/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-texture-view/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/texture-view/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-texture-view/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-texture-view/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-texture-view/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-texture-view/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-texture-view/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-texture-view/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-texture-view/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-texture-view/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-texture-view/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-texture-view/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-texture-view/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-texture-view/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-texture-view/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-texture-view/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-texture-view/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/texture-view/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-texture-view/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-texture-view/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/texture-view/app/src/main/res/values/colors.xml b/android/samples/sample-texture-view/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/values/colors.xml
rename to android/samples/sample-texture-view/src/main/res/values/colors.xml
diff --git a/android/samples/texture-view/app/src/main/res/values/strings.xml b/android/samples/sample-texture-view/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/values/strings.xml
rename to android/samples/sample-texture-view/src/main/res/values/strings.xml
diff --git a/android/samples/texture-view/app/src/main/res/values/styles.xml b/android/samples/sample-texture-view/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/texture-view/app/src/main/res/values/styles.xml
rename to android/samples/sample-texture-view/src/main/res/values/styles.xml
diff --git a/android/samples/textured-object/.gitignore b/android/samples/sample-textured-object/.gitignore
similarity index 100%
rename from android/samples/textured-object/.gitignore
rename to android/samples/sample-textured-object/.gitignore
diff --git a/android/samples/sample-textured-object/build.gradle b/android/samples/sample-textured-object/build.gradle
new file mode 100644
index 0000000000..dadd76738a
--- /dev/null
+++ b/android/samples/sample-textured-object/build.gradle
@@ -0,0 +1,57 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMaterials {
+ group 'Filament'
+ description 'Compile materials'
+
+ inputDir = file("src/main/materials")
+ outputDir = file("src/main/assets/materials")
+}
+
+compileMesh {
+ group 'Filament'
+ description 'Compile mesh'
+
+ inputFile = file("../../../third_party/models/shader_ball/shader_ball.obj")
+ outputDir = file("src/main/assets/models")
+}
+
+generateIbl {
+ group 'Filament'
+ description 'Generate IBL'
+
+ inputFile = file("../../../third_party/environments/venetian_crossroads_2k.hdr")
+ outputDir = file("src/main/assets/envs")
+}
+
+preBuild.dependsOn compileMaterials
+preBuild.dependsOn compileMesh
+preBuild.dependsOn generateIbl
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.textured"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat', 'ktx'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation project(':filament-android')
+}
diff --git a/android/samples/textured-object/app/src/main/AndroidManifest.xml b/android/samples/sample-textured-object/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/textured-object/app/src/main/AndroidManifest.xml
rename to android/samples/sample-textured-object/src/main/AndroidManifest.xml
diff --git a/android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/IblLoader.kt b/android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/IblLoader.kt
similarity index 100%
rename from android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/IblLoader.kt
rename to android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/IblLoader.kt
diff --git a/android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/Io.kt b/android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/Io.kt
similarity index 100%
rename from android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/Io.kt
rename to android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/Io.kt
diff --git a/android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/MainActivity.kt b/android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/MainActivity.kt
similarity index 100%
rename from android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/MainActivity.kt
rename to android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/MainActivity.kt
diff --git a/android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/MeshLoader.kt b/android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/MeshLoader.kt
similarity index 100%
rename from android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/MeshLoader.kt
rename to android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/MeshLoader.kt
diff --git a/android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/TextureLoader.kt b/android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/TextureLoader.kt
similarity index 100%
rename from android/samples/textured-object/app/src/main/java/com/google/android/filament/textured/TextureLoader.kt
rename to android/samples/sample-textured-object/src/main/java/com/google/android/filament/textured/TextureLoader.kt
diff --git a/android/samples/textured-object/app/src/main/materials/textured_pbr.mat b/android/samples/sample-textured-object/src/main/materials/textured_pbr.mat
similarity index 100%
rename from android/samples/textured-object/app/src/main/materials/textured_pbr.mat
rename to android/samples/sample-textured-object/src/main/materials/textured_pbr.mat
diff --git a/android/samples/textured-object/app/src/main/res/drawable-nodpi/floor_ao_roughness_metallic.png b/android/samples/sample-textured-object/src/main/res/drawable-nodpi/floor_ao_roughness_metallic.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/drawable-nodpi/floor_ao_roughness_metallic.png
rename to android/samples/sample-textured-object/src/main/res/drawable-nodpi/floor_ao_roughness_metallic.png
diff --git a/android/samples/textured-object/app/src/main/res/drawable-nodpi/floor_basecolor.png b/android/samples/sample-textured-object/src/main/res/drawable-nodpi/floor_basecolor.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/drawable-nodpi/floor_basecolor.png
rename to android/samples/sample-textured-object/src/main/res/drawable-nodpi/floor_basecolor.png
diff --git a/android/samples/textured-object/app/src/main/res/drawable-nodpi/floor_normal.png b/android/samples/sample-textured-object/src/main/res/drawable-nodpi/floor_normal.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/drawable-nodpi/floor_normal.png
rename to android/samples/sample-textured-object/src/main/res/drawable-nodpi/floor_normal.png
diff --git a/android/samples/textured-object/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-textured-object/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-textured-object/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/textured-object/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-textured-object/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-textured-object/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-textured-object/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-textured-object/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-textured-object/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-textured-object/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-textured-object/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-textured-object/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-textured-object/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-textured-object/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-textured-object/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-textured-object/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-textured-object/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-textured-object/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-textured-object/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/textured-object/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-textured-object/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-textured-object/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/textured-object/app/src/main/res/values/colors.xml b/android/samples/sample-textured-object/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/values/colors.xml
rename to android/samples/sample-textured-object/src/main/res/values/colors.xml
diff --git a/android/samples/textured-object/app/src/main/res/values/strings.xml b/android/samples/sample-textured-object/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/values/strings.xml
rename to android/samples/sample-textured-object/src/main/res/values/strings.xml
diff --git a/android/samples/textured-object/app/src/main/res/values/styles.xml b/android/samples/sample-textured-object/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/textured-object/app/src/main/res/values/styles.xml
rename to android/samples/sample-textured-object/src/main/res/values/styles.xml
diff --git a/android/samples/texture-view/.gitignore b/android/samples/sample-transparent-view/.gitignore
similarity index 100%
rename from android/samples/texture-view/.gitignore
rename to android/samples/sample-transparent-view/.gitignore
diff --git a/android/samples/sample-transparent-view/build.gradle b/android/samples/sample-transparent-view/build.gradle
new file mode 100644
index 0000000000..21ed924d16
--- /dev/null
+++ b/android/samples/sample-transparent-view/build.gradle
@@ -0,0 +1,39 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+
+apply from: '../../gradle/filament-tasks.gradle'
+
+compileMaterials {
+ group 'Filament'
+ description 'Compile materials'
+
+ inputDir = file("src/main/materials")
+ outputDir = file("src/main/assets/materials")
+}
+
+preBuild.dependsOn compileMaterials
+
+clean.doFirst {
+ delete "src/main/assets"
+}
+
+android {
+ compileSdkVersion versions.compileSdk
+ defaultConfig {
+ applicationId "com.google.android.filament.textureview"
+ minSdkVersion versions.minSdk
+ targetSdkVersion versions.targetSdk
+ }
+
+ // We use the .filamat extension for materials compiled with matc
+ // Telling aapt to not compress them allows to load them efficiently
+ aaptOptions {
+ noCompress 'filamat', 'ktx'
+ }
+}
+
+dependencies {
+ implementation deps.kotlin
+ implementation project(':filament-android')
+}
diff --git a/android/samples/transparent-view/app/src/main/AndroidManifest.xml b/android/samples/sample-transparent-view/src/main/AndroidManifest.xml
similarity index 100%
rename from android/samples/transparent-view/app/src/main/AndroidManifest.xml
rename to android/samples/sample-transparent-view/src/main/AndroidManifest.xml
diff --git a/android/samples/transparent-view/app/src/main/java/com/google/android/filament/transparentrendering/MainActivity.kt b/android/samples/sample-transparent-view/src/main/java/com/google/android/filament/transparentrendering/MainActivity.kt
similarity index 100%
rename from android/samples/transparent-view/app/src/main/java/com/google/android/filament/transparentrendering/MainActivity.kt
rename to android/samples/sample-transparent-view/src/main/java/com/google/android/filament/transparentrendering/MainActivity.kt
diff --git a/android/samples/transparent-view/app/src/main/materials/baked_color.mat b/android/samples/sample-transparent-view/src/main/materials/baked_color.mat
similarity index 100%
rename from android/samples/transparent-view/app/src/main/materials/baked_color.mat
rename to android/samples/sample-transparent-view/src/main/materials/baked_color.mat
diff --git a/android/samples/transparent-view/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/android/samples/sample-transparent-view/src/main/res/drawable-v24/ic_launcher_foreground.xml
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
rename to android/samples/sample-transparent-view/src/main/res/drawable-v24/ic_launcher_foreground.xml
diff --git a/android/samples/transparent-view/app/src/main/res/drawable/ic_launcher_background.xml b/android/samples/sample-transparent-view/src/main/res/drawable/ic_launcher_background.xml
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/drawable/ic_launcher_background.xml
rename to android/samples/sample-transparent-view/src/main/res/drawable/ic_launcher_background.xml
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/samples/sample-transparent-view/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
rename to android/samples/sample-transparent-view/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/samples/sample-transparent-view/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
rename to android/samples/sample-transparent-view/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/samples/sample-transparent-view/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/samples/sample-transparent-view/src/main/res/mipmap-hdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-hdpi/ic_launcher_round.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/samples/sample-transparent-view/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/samples/sample-transparent-view/src/main/res/mipmap-mdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-mdpi/ic_launcher_round.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/samples/sample-transparent-view/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/samples/sample-transparent-view/src/main/res/mipmap-xhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-xhdpi/ic_launcher_round.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/samples/sample-transparent-view/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/samples/sample-transparent-view/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/samples/sample-transparent-view/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/android/samples/transparent-view/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/samples/sample-transparent-view/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
rename to android/samples/sample-transparent-view/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
diff --git a/android/samples/transparent-view/app/src/main/res/values/colors.xml b/android/samples/sample-transparent-view/src/main/res/values/colors.xml
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/values/colors.xml
rename to android/samples/sample-transparent-view/src/main/res/values/colors.xml
diff --git a/android/samples/transparent-view/app/src/main/res/values/strings.xml b/android/samples/sample-transparent-view/src/main/res/values/strings.xml
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/values/strings.xml
rename to android/samples/sample-transparent-view/src/main/res/values/strings.xml
diff --git a/android/samples/transparent-view/app/src/main/res/values/styles.xml b/android/samples/sample-transparent-view/src/main/res/values/styles.xml
similarity index 100%
rename from android/samples/transparent-view/app/src/main/res/values/styles.xml
rename to android/samples/sample-transparent-view/src/main/res/values/styles.xml
diff --git a/android/samples/stream-test/app/.gitignore b/android/samples/stream-test/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/stream-test/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/stream-test/app/build.gradle b/android/samples/stream-test/app/build.gradle
deleted file mode 100644
index 99d22704ba..0000000000
--- a/android/samples/stream-test/app/build.gradle
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMaterials {
- group 'Filament'
- description 'Compile materials'
-
- inputDir = file("src/main/materials")
- outputDir = file("src/main/assets/materials")
-}
-
-preBuild.dependsOn compileMaterials
-
-clean.doFirst {
- delete "src/main/assets"
-}
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.streamtest"
- minSdkVersion 23 // 21 is required for CameraDevice.StateCallback, 23 is required for shouldShowRequestPermissionRationale
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
- implementation 'com.android.support:support-compat:28.0.0'
-}
diff --git a/android/samples/stream-test/app/proguard-rules.pro b/android/samples/stream-test/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/stream-test/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/stream-test/build.gradle b/android/samples/stream-test/build.gradle
deleted file mode 100644
index 811c9ec35f..0000000000
--- a/android/samples/stream-test/build.gradle
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/stream-test/gradle.properties b/android/samples/stream-test/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/stream-test/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/stream-test/gradle/wrapper/gradle-wrapper.jar b/android/samples/stream-test/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 7a3265ee94..0000000000
Binary files a/android/samples/stream-test/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/stream-test/gradle/wrapper/gradle-wrapper.properties b/android/samples/stream-test/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index d021d34adb..0000000000
--- a/android/samples/stream-test/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jan 14 11:08:15 PST 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/stream-test/gradlew b/android/samples/stream-test/gradlew
deleted file mode 100755
index cccdd3d517..0000000000
--- a/android/samples/stream-test/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/stream-test/gradlew.bat b/android/samples/stream-test/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/android/samples/stream-test/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/stream-test/settings.gradle b/android/samples/stream-test/settings.gradle
deleted file mode 100644
index 466fef9302..0000000000
--- a/android/samples/stream-test/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-includeBuild '../../filament-android'
-
-include ':app'
diff --git a/android/samples/texture-view/app/.gitignore b/android/samples/texture-view/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/texture-view/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/texture-view/app/build.gradle b/android/samples/texture-view/app/build.gradle
deleted file mode 100644
index 0559e057a9..0000000000
--- a/android/samples/texture-view/app/build.gradle
+++ /dev/null
@@ -1,84 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMaterials {
- group 'Filament'
- description 'Compile materials'
-
- inputDir = file("src/main/materials")
- outputDir = file("src/main/assets/materials")
-}
-
-preBuild.dependsOn compileMaterials
-
-clean.doFirst {
- delete "src/main/assets"
-}
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.textureview"
- minSdkVersion 19
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
-}
diff --git a/android/samples/texture-view/app/proguard-rules.pro b/android/samples/texture-view/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/texture-view/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/texture-view/build.gradle b/android/samples/texture-view/build.gradle
deleted file mode 100644
index 8d482e6764..0000000000
--- a/android/samples/texture-view/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/texture-view/gradle.properties b/android/samples/texture-view/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/texture-view/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/texture-view/gradle/wrapper/gradle-wrapper.jar b/android/samples/texture-view/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 7a3265ee94..0000000000
Binary files a/android/samples/texture-view/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/texture-view/gradle/wrapper/gradle-wrapper.properties b/android/samples/texture-view/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 73ee5c5944..0000000000
--- a/android/samples/texture-view/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jan 14 11:07:34 PST 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/texture-view/gradlew b/android/samples/texture-view/gradlew
deleted file mode 100755
index cccdd3d517..0000000000
--- a/android/samples/texture-view/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/texture-view/gradlew.bat b/android/samples/texture-view/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/android/samples/texture-view/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/texture-view/settings.gradle b/android/samples/texture-view/settings.gradle
deleted file mode 100644
index 466fef9302..0000000000
--- a/android/samples/texture-view/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-includeBuild '../../filament-android'
-
-include ':app'
diff --git a/android/samples/textured-object/app/.gitignore b/android/samples/textured-object/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/textured-object/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/textured-object/app/build.gradle b/android/samples/textured-object/app/build.gradle
deleted file mode 100644
index 4db15b8247..0000000000
--- a/android/samples/textured-object/app/build.gradle
+++ /dev/null
@@ -1,102 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMaterials {
- group 'Filament'
- description 'Compile materials'
-
- inputDir = file("src/main/materials")
- outputDir = file("src/main/assets/materials")
-}
-
-compileMesh {
- group 'Filament'
- description 'Compile mesh'
-
- inputFile = file("../../../../third_party/models/shader_ball/shader_ball.obj")
- outputDir = file("src/main/assets/models")
-}
-
-generateIbl {
- group 'Filament'
- description 'Generate IBL'
-
- inputFile = file("../../../../third_party/environments/venetian_crossroads_2k.hdr")
- outputDir = file("src/main/assets/envs")
-}
-
-preBuild.dependsOn compileMaterials
-preBuild.dependsOn compileMesh
-preBuild.dependsOn generateIbl
-
-clean.doFirst {
- delete "src/main/assets"
-}
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.textured"
- minSdkVersion 19
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
-}
diff --git a/android/samples/textured-object/app/proguard-rules.pro b/android/samples/textured-object/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/textured-object/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/textured-object/app/src/main/assets/models/shader_ball.filamesh b/android/samples/textured-object/app/src/main/assets/models/shader_ball.filamesh
deleted file mode 100644
index 0079be3f4c..0000000000
Binary files a/android/samples/textured-object/app/src/main/assets/models/shader_ball.filamesh and /dev/null differ
diff --git a/android/samples/textured-object/build.gradle b/android/samples/textured-object/build.gradle
deleted file mode 100644
index 8d482e6764..0000000000
--- a/android/samples/textured-object/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/textured-object/gradle.properties b/android/samples/textured-object/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/textured-object/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/textured-object/gradle/wrapper/gradle-wrapper.jar b/android/samples/textured-object/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 87b738cbd0..0000000000
Binary files a/android/samples/textured-object/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/textured-object/gradle/wrapper/gradle-wrapper.properties b/android/samples/textured-object/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index f4d7b2bf61..0000000000
--- a/android/samples/textured-object/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/android/samples/textured-object/gradlew b/android/samples/textured-object/gradlew
deleted file mode 100755
index af6708ff22..0000000000
--- a/android/samples/textured-object/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/textured-object/gradlew.bat b/android/samples/textured-object/gradlew.bat
deleted file mode 100644
index 0f8d5937c4..0000000000
--- a/android/samples/textured-object/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/textured-object/settings.gradle b/android/samples/textured-object/settings.gradle
deleted file mode 100644
index 466fef9302..0000000000
--- a/android/samples/textured-object/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-includeBuild '../../filament-android'
-
-include ':app'
diff --git a/android/samples/transparent-view/app/.gitignore b/android/samples/transparent-view/app/.gitignore
deleted file mode 100644
index 796b96d1c4..0000000000
--- a/android/samples/transparent-view/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/samples/transparent-view/app/build.gradle b/android/samples/transparent-view/app/build.gradle
deleted file mode 100644
index bb12e8c252..0000000000
--- a/android/samples/transparent-view/app/build.gradle
+++ /dev/null
@@ -1,84 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-
-apply from: '../../../build/filament-tasks.gradle'
-
-compileMaterials {
- group 'Filament'
- description 'Compile materials'
-
- inputDir = file("src/main/materials")
- outputDir = file("src/main/assets/materials")
-}
-
-preBuild.dependsOn compileMaterials
-
-clean.doFirst {
- delete "src/main/assets"
-}
-
-android {
- compileSdkVersion 29
- defaultConfig {
- applicationId "com.google.android.filament.hellotriangle"
- minSdkVersion 19
- targetSdkVersion 29
- versionCode 1
- versionName "1.0"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- // Filament comes with native code, the following declarations
- // can be used to generate architecture specific APKs
- flavorDimensions 'cpuArch'
- productFlavors {
- arm8 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- arm7 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'armeabi-v7a'
- }
- }
- x86_64 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86_64'
- }
- }
- x86 {
- dimension 'cpuArch'
- ndk {
- abiFilters 'x86'
- }
- }
- universal {
- dimension 'cpuArch'
- }
- }
-
- // We use the .filamat extension for materials compiled with matc
- // Telling aapt to not compress them allows to load them efficiently
- aaptOptions {
- noCompress 'filamat'
- }
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-
- // Depend on Filament
- implementation 'com.google.android.filament:filament-android'
-}
diff --git a/android/samples/transparent-view/app/proguard-rules.pro b/android/samples/transparent-view/app/proguard-rules.pro
deleted file mode 100644
index f1b424510d..0000000000
--- a/android/samples/transparent-view/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/samples/transparent-view/build.gradle b/android/samples/transparent-view/build.gradle
deleted file mode 100644
index 8d482e6764..0000000000
--- a/android/samples/transparent-view/build.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = '1.3.50'
- repositories {
- google()
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/android/samples/transparent-view/gradle.properties b/android/samples/transparent-view/gradle.properties
deleted file mode 100644
index 743d692ce1..0000000000
--- a/android/samples/transparent-view/gradle.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Project-wide Gradle settings.
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
diff --git a/android/samples/transparent-view/gradle/wrapper/gradle-wrapper.jar b/android/samples/transparent-view/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 7a3265ee94..0000000000
Binary files a/android/samples/transparent-view/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/android/samples/transparent-view/gradle/wrapper/gradle-wrapper.properties b/android/samples/transparent-view/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 6ee3d2db59..0000000000
--- a/android/samples/transparent-view/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jan 14 11:05:59 PST 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/android/samples/transparent-view/gradlew b/android/samples/transparent-view/gradlew
deleted file mode 100755
index cccdd3d517..0000000000
--- a/android/samples/transparent-view/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/android/samples/transparent-view/gradlew.bat b/android/samples/transparent-view/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/android/samples/transparent-view/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/android/samples/transparent-view/settings.gradle b/android/samples/transparent-view/settings.gradle
deleted file mode 100644
index 466fef9302..0000000000
--- a/android/samples/transparent-view/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-includeBuild '../../filament-android'
-
-include ':app'
diff --git a/android/settings.gradle b/android/settings.gradle
new file mode 100644
index 0000000000..c6d97a5cdd
--- /dev/null
+++ b/android/settings.gradle
@@ -0,0 +1,18 @@
+// Libraries
+include ':filament-android'
+include ':filamat-android'
+include ':gltfio-android'
+
+// Samples
+include ':samples:sample-gltf-bloom'
+include ':samples:sample-hello-camera'
+include ':samples:sample-hello-triangle'
+include ':samples:sample-image-based-lighting'
+include ':samples:sample-lit-cube'
+include ':samples:sample-material-builder'
+include ':samples:sample-stream-test'
+include ':samples:sample-texture-view'
+include ':samples:sample-textured-object'
+include ':samples:sample-transparent-view'
+
+rootProject.name = 'filament'
diff --git a/build.sh b/build.sh
index f980067ac1..933a2c49b0 100755
--- a/build.sh
+++ b/build.sh
@@ -366,79 +366,51 @@ function build_android {
archive_android "Release"
fi
- cd android/filament-android
+ cd android
if [[ "$ISSUE_DEBUG_BUILD" == "true" ]]; then
- ./gradlew -Pfilament_dist_dir=../../out/android-debug/filament assembleDebug \
- -Pextra_cmake_args=${VULKAN_ANDROID_OPTION}
-
- if [[ "$INSTALL_COMMAND" ]]; then
- echo "Installing out/filament-android-debug.aar..."
- cp build/outputs/aar/filament-android-debug.aar ../../out/
- fi
- fi
-
- if [[ "$ISSUE_RELEASE_BUILD" == "true" ]]; then
- ./gradlew -Pfilament_dist_dir=../../out/android-release/filament assembleRelease \
- -Pextra_cmake_args=${VULKAN_ANDROID_OPTION}
-
- if [[ "$INSTALL_COMMAND" ]]; then
- echo "Installing out/filament-android-release.aar..."
- cp build/outputs/aar/filament-android-release.aar ../../out/
- fi
- fi
-
- cd ../..
-
-
- cd android/filamat-android
-
- if [[ "$ISSUE_DEBUG_BUILD" == "true" ]]; then
- ./gradlew -Pfilament_dist_dir=../../out/android-debug/filament assembleDebug
+ ./gradlew \
+ -Pfilament_dist_dir=../out/android-debug/filament \
+ -Pextra_cmake_args=${VULKAN_ANDROID_OPTION} \
+ :filamat-android:assembleDebug \
+ :filament-android:assembleDebug \
+ :gltfio-android:assembleDebug
if [[ "$INSTALL_COMMAND" ]]; then
echo "Installing out/filamat-android-debug.aar..."
- cp build/outputs/aar/filamat-android-full-debug.aar ../../out/
- cp build/outputs/aar/filamat-android-lite-debug.aar ../../out/
+ cp filamat-android/build/outputs/aar/filamat-android-full-debug.aar ../out/
+ cp filamat-android/build/outputs/aar/filamat-android-lite-debug.aar ../out/
+
+ echo "Installing out/filament-android-debug.aar..."
+ cp filament-android/build/outputs/aar/filament-android-debug.aar ../out/
+
+ echo "Installing out/gltfio-android-debug.aar..."
+ cp gltfio-android/build/outputs/aar/gltfio-android-debug.aar ../out/
fi
fi
if [[ "$ISSUE_RELEASE_BUILD" == "true" ]]; then
- ./gradlew -Pfilament_dist_dir=../../out/android-release/filament assembleRelease
+ ./gradlew \
+ -Pfilament_dist_dir=../out/android-release/filament \
+ -Pextra_cmake_args=${VULKAN_ANDROID_OPTION} \
+ :filamat-android:assembleRelease \
+ :filament-android:assembleRelease \
+ :gltfio-android:assembleRelease
if [[ "$INSTALL_COMMAND" ]]; then
echo "Installing out/filamat-android-release.aar..."
- cp build/outputs/aar/filamat-android-full-release.aar ../../out/
- cp build/outputs/aar/filamat-android-lite-release.aar ../../out/
- fi
- fi
+ cp filamat-android/build/outputs/aar/filamat-android-full-release.aar ../out/
+ cp filamat-android/build/outputs/aar/filamat-android-lite-release.aar ../out/
- cd ../..
+ echo "Installing out/filament-android-release.aar..."
+ cp filament-android/build/outputs/aar/filament-android-release.aar ../out/
-
- cd android/gltfio-android
-
- if [[ "$ISSUE_DEBUG_BUILD" == "true" ]]; then
- ./gradlew -Pfilament_dist_dir=../../out/android-debug/filament assembleDebug \
- -Pextra_cmake_args=${VULKAN_ANDROID_OPTION}
-
- if [[ "$INSTALL_COMMAND" ]]; then
- echo "Installing out/gltfio-android-debug.aar..."
- cp build/outputs/aar/gltfio-android-debug.aar ../../out/
- fi
- fi
-
- if [[ "$ISSUE_RELEASE_BUILD" == "true" ]]; then
- ./gradlew -Pfilament_dist_dir=../../out/android-release/filament assembleRelease \
- -Pextra_cmake_args=${VULKAN_ANDROID_OPTION}
-
- if [[ "$INSTALL_COMMAND" ]]; then
echo "Installing out/gltfio-android-release.aar..."
- cp build/outputs/aar/gltfio-android-release.aar ../../out/
+ cp gltfio-android/build/outputs/aar/gltfio-android-release.aar ../out/
fi
fi
- cd ../..
+ cd ..
}
function ensure_ios_toolchain {
diff --git a/java/filamat/CMakeLists.txt b/java/filamat/CMakeLists.txt
index 4a6829704d..e47c83dbdc 100644
--- a/java/filamat/CMakeLists.txt
+++ b/java/filamat/CMakeLists.txt
@@ -76,6 +76,6 @@ set(JAVA_SOURCE_FILES
add_jar(${TARGET}
SOURCES ${JAVA_SOURCE_FILES}
- INCLUDE_JARS ../lib/support-annotations.jar)
+ INCLUDE_JARS ../lib/annotation-1.0.0.jar)
install_jar(${TARGET} lib)
diff --git a/java/filament/CMakeLists.txt b/java/filament/CMakeLists.txt
index f3d8e11e89..bb657722b3 100644
--- a/java/filament/CMakeLists.txt
+++ b/java/filament/CMakeLists.txt
@@ -156,6 +156,6 @@ set(JAVA_SOURCE_FILES
add_jar(${TARGET}
SOURCES ${JAVA_SOURCE_FILES}
- INCLUDE_JARS ../lib/support-annotations.jar)
+ INCLUDE_JARS ../lib/annotation-1.0.0.jar)
install_jar(${TARGET} lib)
diff --git a/java/filament/src/java/com/google/android/filament/FilamentCanvas.java b/java/filament/src/java/com/google/android/filament/FilamentCanvas.java
index fc15a9fa92..f40dd77f6e 100644
--- a/java/filament/src/java/com/google/android/filament/FilamentCanvas.java
+++ b/java/filament/src/java/com/google/android/filament/FilamentCanvas.java
@@ -23,7 +23,7 @@ import com.google.android.filament.Engine;
import com.google.android.filament.SwapChain;
import com.google.android.filament.View;
import com.google.android.filament.Renderer;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
public class FilamentCanvas extends Canvas implements FilamentTarget {
private SwapChain mSwapChain;
diff --git a/java/filament/src/java/com/google/android/filament/FilamentPanel.java b/java/filament/src/java/com/google/android/filament/FilamentPanel.java
index 945f42be38..28acfaec21 100644
--- a/java/filament/src/java/com/google/android/filament/FilamentPanel.java
+++ b/java/filament/src/java/com/google/android/filament/FilamentPanel.java
@@ -28,7 +28,7 @@ import java.util.concurrent.Executors;
import java.util.concurrent.ExecutorService;
import java.nio.ByteBuffer;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
/**
diff --git a/java/filament/src/java/com/google/android/filament/FilamentTarget.java b/java/filament/src/java/com/google/android/filament/FilamentTarget.java
index 2cb9c93185..0fdf8ea34e 100644
--- a/java/filament/src/java/com/google/android/filament/FilamentTarget.java
+++ b/java/filament/src/java/com/google/android/filament/FilamentTarget.java
@@ -16,7 +16,7 @@
package com.google.android.filament;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
public interface FilamentTarget {
boolean beginFrame(Engine engine, Renderer renderer);
diff --git a/java/lib/annotation-1.0.0.jar b/java/lib/annotation-1.0.0.jar
new file mode 100644
index 0000000000..124f128d32
Binary files /dev/null and b/java/lib/annotation-1.0.0.jar differ
diff --git a/java/lib/support-annotations.jar b/java/lib/support-annotations.jar
deleted file mode 100644
index 9f2bc86552..0000000000
Binary files a/java/lib/support-annotations.jar and /dev/null differ