diff --git a/.classpath b/.classpath
deleted file mode 100644
index 7bc01d9a..00000000
--- a/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/.gitignore b/.gitignore
index f6a05f80..d0203481 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,15 @@
-.gitignore
-bin
-gen
+.DS_Store
+
+# IDE files
+/.idea/
+**/*.iml
+
+# Gradle files
+/.gradle/
+**/build/
+
+# Local configuration file (sdk path, etc)
+/local.properties
+
+# inspect
+.buildProfile/
diff --git a/.project b/.project
deleted file mode 100644
index 193fb297..00000000
--- a/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- Grafika
-
-
-
-
-
- com.android.ide.eclipse.adt.ResourceManagerBuilder
-
-
-
-
- com.android.ide.eclipse.adt.PreCompilerBuilder
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- com.android.ide.eclipse.adt.ApkBuilder
-
-
-
-
-
- com.android.ide.eclipse.adt.AndroidNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b080d2dd..00000000
--- a/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 00000000..6adb4588
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,31 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.2.3'
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
+
+ext {
+ releaseVersionCode = 33
+ releaseVersionName = '1.0'
+
+ minSdkVersion = 18
+ androidCompileSdkVersion = 25
+ androidBuildToolsVersion = '25.0.2'
+ targetSdkVersion = 22
+ androidSupportSdkVersion = '25.1.1'
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 00000000..89e0d99e
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,18 @@
+# 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.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# 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/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..13372aef
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..07f42b11
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Sep 12 11:50:58 CST 2016
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 00000000..9d82f789
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# 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
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# 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
+
+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" ] ; 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
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 00000000..aec99730
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@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
+
+@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=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@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 Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_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=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+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/grafika/build.gradle b/grafika/build.gradle
new file mode 100644
index 00000000..8cc2a143
--- /dev/null
+++ b/grafika/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion rootProject.ext.androidCompileSdkVersion
+ buildToolsVersion rootProject.ext.androidBuildToolsVersion
+
+ defaultConfig {
+ minSdkVersion rootProject.ext.minSdkVersion
+ targetSdkVersion rootProject.ext.targetSdkVersion
+ versionCode rootProject.ext.releaseVersionCode
+ versionName rootProject.ext.releaseVersionName
+
+ applicationId "com.android.grafika"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile "com.android.support:support-v4:$rootProject.ext.androidSupportSdkVersion"
+}
diff --git a/proguard-project.txt b/grafika/proguard-project.txt
similarity index 100%
rename from proguard-project.txt
rename to grafika/proguard-project.txt
diff --git a/AndroidManifest.xml b/grafika/src/main/AndroidManifest.xml
similarity index 96%
rename from AndroidManifest.xml
rename to grafika/src/main/AndroidManifest.xml
index 32614a28..eb9d773c 100644
--- a/AndroidManifest.xml
+++ b/grafika/src/main/AndroidManifest.xml
@@ -16,13 +16,7 @@
-->
-
-
+ package="com.android.grafika" >
diff --git a/src/com/android/grafika/AboutBox.java b/grafika/src/main/java/com/android/grafika/AboutBox.java
similarity index 100%
rename from src/com/android/grafika/AboutBox.java
rename to grafika/src/main/java/com/android/grafika/AboutBox.java
diff --git a/src/com/android/grafika/AspectFrameLayout.java b/grafika/src/main/java/com/android/grafika/AspectFrameLayout.java
similarity index 100%
rename from src/com/android/grafika/AspectFrameLayout.java
rename to grafika/src/main/java/com/android/grafika/AspectFrameLayout.java
diff --git a/src/com/android/grafika/CameraCaptureActivity.java b/grafika/src/main/java/com/android/grafika/CameraCaptureActivity.java
similarity index 100%
rename from src/com/android/grafika/CameraCaptureActivity.java
rename to grafika/src/main/java/com/android/grafika/CameraCaptureActivity.java
diff --git a/src/com/android/grafika/CameraUtils.java b/grafika/src/main/java/com/android/grafika/CameraUtils.java
similarity index 100%
rename from src/com/android/grafika/CameraUtils.java
rename to grafika/src/main/java/com/android/grafika/CameraUtils.java
diff --git a/src/com/android/grafika/ChorTestActivity.java b/grafika/src/main/java/com/android/grafika/ChorTestActivity.java
similarity index 100%
rename from src/com/android/grafika/ChorTestActivity.java
rename to grafika/src/main/java/com/android/grafika/ChorTestActivity.java
diff --git a/src/com/android/grafika/CircularEncoder.java b/grafika/src/main/java/com/android/grafika/CircularEncoder.java
similarity index 100%
rename from src/com/android/grafika/CircularEncoder.java
rename to grafika/src/main/java/com/android/grafika/CircularEncoder.java
diff --git a/src/com/android/grafika/CircularEncoderBuffer.java b/grafika/src/main/java/com/android/grafika/CircularEncoderBuffer.java
similarity index 100%
rename from src/com/android/grafika/CircularEncoderBuffer.java
rename to grafika/src/main/java/com/android/grafika/CircularEncoderBuffer.java
diff --git a/src/com/android/grafika/CodecOpenActivity.java b/grafika/src/main/java/com/android/grafika/CodecOpenActivity.java
similarity index 100%
rename from src/com/android/grafika/CodecOpenActivity.java
rename to grafika/src/main/java/com/android/grafika/CodecOpenActivity.java
diff --git a/src/com/android/grafika/ColorBarActivity.java b/grafika/src/main/java/com/android/grafika/ColorBarActivity.java
similarity index 100%
rename from src/com/android/grafika/ColorBarActivity.java
rename to grafika/src/main/java/com/android/grafika/ColorBarActivity.java
diff --git a/src/com/android/grafika/Content.java b/grafika/src/main/java/com/android/grafika/Content.java
similarity index 100%
rename from src/com/android/grafika/Content.java
rename to grafika/src/main/java/com/android/grafika/Content.java
diff --git a/src/com/android/grafika/ContentManager.java b/grafika/src/main/java/com/android/grafika/ContentManager.java
similarity index 100%
rename from src/com/android/grafika/ContentManager.java
rename to grafika/src/main/java/com/android/grafika/ContentManager.java
diff --git a/src/com/android/grafika/ContinuousCaptureActivity.java b/grafika/src/main/java/com/android/grafika/ContinuousCaptureActivity.java
similarity index 100%
rename from src/com/android/grafika/ContinuousCaptureActivity.java
rename to grafika/src/main/java/com/android/grafika/ContinuousCaptureActivity.java
diff --git a/src/com/android/grafika/DoubleDecodeActivity.java b/grafika/src/main/java/com/android/grafika/DoubleDecodeActivity.java
similarity index 100%
rename from src/com/android/grafika/DoubleDecodeActivity.java
rename to grafika/src/main/java/com/android/grafika/DoubleDecodeActivity.java
diff --git a/src/com/android/grafika/GeneratedMovie.java b/grafika/src/main/java/com/android/grafika/GeneratedMovie.java
similarity index 100%
rename from src/com/android/grafika/GeneratedMovie.java
rename to grafika/src/main/java/com/android/grafika/GeneratedMovie.java
diff --git a/src/com/android/grafika/GlesInfoActivity.java b/grafika/src/main/java/com/android/grafika/GlesInfoActivity.java
similarity index 100%
rename from src/com/android/grafika/GlesInfoActivity.java
rename to grafika/src/main/java/com/android/grafika/GlesInfoActivity.java
diff --git a/src/com/android/grafika/HardwareScalerActivity.java b/grafika/src/main/java/com/android/grafika/HardwareScalerActivity.java
similarity index 100%
rename from src/com/android/grafika/HardwareScalerActivity.java
rename to grafika/src/main/java/com/android/grafika/HardwareScalerActivity.java
diff --git a/src/com/android/grafika/LiveCameraActivity.java b/grafika/src/main/java/com/android/grafika/LiveCameraActivity.java
similarity index 100%
rename from src/com/android/grafika/LiveCameraActivity.java
rename to grafika/src/main/java/com/android/grafika/LiveCameraActivity.java
diff --git a/src/com/android/grafika/MainActivity.java b/grafika/src/main/java/com/android/grafika/MainActivity.java
similarity index 100%
rename from src/com/android/grafika/MainActivity.java
rename to grafika/src/main/java/com/android/grafika/MainActivity.java
diff --git a/src/com/android/grafika/MiscUtils.java b/grafika/src/main/java/com/android/grafika/MiscUtils.java
similarity index 100%
rename from src/com/android/grafika/MiscUtils.java
rename to grafika/src/main/java/com/android/grafika/MiscUtils.java
diff --git a/src/com/android/grafika/MovieEightRects.java b/grafika/src/main/java/com/android/grafika/MovieEightRects.java
similarity index 100%
rename from src/com/android/grafika/MovieEightRects.java
rename to grafika/src/main/java/com/android/grafika/MovieEightRects.java
diff --git a/src/com/android/grafika/MoviePlayer.java b/grafika/src/main/java/com/android/grafika/MoviePlayer.java
similarity index 100%
rename from src/com/android/grafika/MoviePlayer.java
rename to grafika/src/main/java/com/android/grafika/MoviePlayer.java
diff --git a/src/com/android/grafika/MovieSliders.java b/grafika/src/main/java/com/android/grafika/MovieSliders.java
similarity index 100%
rename from src/com/android/grafika/MovieSliders.java
rename to grafika/src/main/java/com/android/grafika/MovieSliders.java
diff --git a/src/com/android/grafika/MultiSurfaceActivity.java b/grafika/src/main/java/com/android/grafika/MultiSurfaceActivity.java
similarity index 100%
rename from src/com/android/grafika/MultiSurfaceActivity.java
rename to grafika/src/main/java/com/android/grafika/MultiSurfaceActivity.java
diff --git a/src/com/android/grafika/PlayMovieActivity.java b/grafika/src/main/java/com/android/grafika/PlayMovieActivity.java
similarity index 100%
rename from src/com/android/grafika/PlayMovieActivity.java
rename to grafika/src/main/java/com/android/grafika/PlayMovieActivity.java
diff --git a/src/com/android/grafika/PlayMovieSurfaceActivity.java b/grafika/src/main/java/com/android/grafika/PlayMovieSurfaceActivity.java
similarity index 100%
rename from src/com/android/grafika/PlayMovieSurfaceActivity.java
rename to grafika/src/main/java/com/android/grafika/PlayMovieSurfaceActivity.java
diff --git a/src/com/android/grafika/ReadPixelsActivity.java b/grafika/src/main/java/com/android/grafika/ReadPixelsActivity.java
similarity index 100%
rename from src/com/android/grafika/ReadPixelsActivity.java
rename to grafika/src/main/java/com/android/grafika/ReadPixelsActivity.java
diff --git a/src/com/android/grafika/RecordFBOActivity.java b/grafika/src/main/java/com/android/grafika/RecordFBOActivity.java
similarity index 100%
rename from src/com/android/grafika/RecordFBOActivity.java
rename to grafika/src/main/java/com/android/grafika/RecordFBOActivity.java
diff --git a/src/com/android/grafika/ScaledDrawable2d.java b/grafika/src/main/java/com/android/grafika/ScaledDrawable2d.java
similarity index 100%
rename from src/com/android/grafika/ScaledDrawable2d.java
rename to grafika/src/main/java/com/android/grafika/ScaledDrawable2d.java
diff --git a/src/com/android/grafika/ScheduledSwapActivity.java b/grafika/src/main/java/com/android/grafika/ScheduledSwapActivity.java
similarity index 100%
rename from src/com/android/grafika/ScheduledSwapActivity.java
rename to grafika/src/main/java/com/android/grafika/ScheduledSwapActivity.java
diff --git a/src/com/android/grafika/SoftInputSurfaceActivity.java b/grafika/src/main/java/com/android/grafika/SoftInputSurfaceActivity.java
similarity index 100%
rename from src/com/android/grafika/SoftInputSurfaceActivity.java
rename to grafika/src/main/java/com/android/grafika/SoftInputSurfaceActivity.java
diff --git a/src/com/android/grafika/SpeedControlCallback.java b/grafika/src/main/java/com/android/grafika/SpeedControlCallback.java
similarity index 100%
rename from src/com/android/grafika/SpeedControlCallback.java
rename to grafika/src/main/java/com/android/grafika/SpeedControlCallback.java
diff --git a/src/com/android/grafika/TextureFromCameraActivity.java b/grafika/src/main/java/com/android/grafika/TextureFromCameraActivity.java
similarity index 100%
rename from src/com/android/grafika/TextureFromCameraActivity.java
rename to grafika/src/main/java/com/android/grafika/TextureFromCameraActivity.java
diff --git a/src/com/android/grafika/TextureMovieEncoder.java b/grafika/src/main/java/com/android/grafika/TextureMovieEncoder.java
similarity index 100%
rename from src/com/android/grafika/TextureMovieEncoder.java
rename to grafika/src/main/java/com/android/grafika/TextureMovieEncoder.java
diff --git a/src/com/android/grafika/TextureMovieEncoder2.java b/grafika/src/main/java/com/android/grafika/TextureMovieEncoder2.java
similarity index 100%
rename from src/com/android/grafika/TextureMovieEncoder2.java
rename to grafika/src/main/java/com/android/grafika/TextureMovieEncoder2.java
diff --git a/src/com/android/grafika/TextureUploadActivity.java b/grafika/src/main/java/com/android/grafika/TextureUploadActivity.java
similarity index 100%
rename from src/com/android/grafika/TextureUploadActivity.java
rename to grafika/src/main/java/com/android/grafika/TextureUploadActivity.java
diff --git a/src/com/android/grafika/TextureViewCanvasActivity.java b/grafika/src/main/java/com/android/grafika/TextureViewCanvasActivity.java
similarity index 100%
rename from src/com/android/grafika/TextureViewCanvasActivity.java
rename to grafika/src/main/java/com/android/grafika/TextureViewCanvasActivity.java
diff --git a/src/com/android/grafika/TextureViewGLActivity.java b/grafika/src/main/java/com/android/grafika/TextureViewGLActivity.java
similarity index 100%
rename from src/com/android/grafika/TextureViewGLActivity.java
rename to grafika/src/main/java/com/android/grafika/TextureViewGLActivity.java
diff --git a/src/com/android/grafika/VideoEncoderCore.java b/grafika/src/main/java/com/android/grafika/VideoEncoderCore.java
similarity index 100%
rename from src/com/android/grafika/VideoEncoderCore.java
rename to grafika/src/main/java/com/android/grafika/VideoEncoderCore.java
diff --git a/src/com/android/grafika/WorkDialog.java b/grafika/src/main/java/com/android/grafika/WorkDialog.java
similarity index 100%
rename from src/com/android/grafika/WorkDialog.java
rename to grafika/src/main/java/com/android/grafika/WorkDialog.java
diff --git a/src/com/android/grafika/gles/Drawable2d.java b/grafika/src/main/java/com/android/grafika/gles/Drawable2d.java
similarity index 100%
rename from src/com/android/grafika/gles/Drawable2d.java
rename to grafika/src/main/java/com/android/grafika/gles/Drawable2d.java
diff --git a/src/com/android/grafika/gles/EglCore.java b/grafika/src/main/java/com/android/grafika/gles/EglCore.java
similarity index 100%
rename from src/com/android/grafika/gles/EglCore.java
rename to grafika/src/main/java/com/android/grafika/gles/EglCore.java
diff --git a/src/com/android/grafika/gles/EglSurfaceBase.java b/grafika/src/main/java/com/android/grafika/gles/EglSurfaceBase.java
similarity index 100%
rename from src/com/android/grafika/gles/EglSurfaceBase.java
rename to grafika/src/main/java/com/android/grafika/gles/EglSurfaceBase.java
diff --git a/src/com/android/grafika/gles/FlatShadedProgram.java b/grafika/src/main/java/com/android/grafika/gles/FlatShadedProgram.java
similarity index 100%
rename from src/com/android/grafika/gles/FlatShadedProgram.java
rename to grafika/src/main/java/com/android/grafika/gles/FlatShadedProgram.java
diff --git a/src/com/android/grafika/gles/FullFrameRect.java b/grafika/src/main/java/com/android/grafika/gles/FullFrameRect.java
similarity index 100%
rename from src/com/android/grafika/gles/FullFrameRect.java
rename to grafika/src/main/java/com/android/grafika/gles/FullFrameRect.java
diff --git a/src/com/android/grafika/gles/GeneratedTexture.java b/grafika/src/main/java/com/android/grafika/gles/GeneratedTexture.java
similarity index 100%
rename from src/com/android/grafika/gles/GeneratedTexture.java
rename to grafika/src/main/java/com/android/grafika/gles/GeneratedTexture.java
diff --git a/src/com/android/grafika/gles/GlUtil.java b/grafika/src/main/java/com/android/grafika/gles/GlUtil.java
similarity index 100%
rename from src/com/android/grafika/gles/GlUtil.java
rename to grafika/src/main/java/com/android/grafika/gles/GlUtil.java
diff --git a/src/com/android/grafika/gles/OffscreenSurface.java b/grafika/src/main/java/com/android/grafika/gles/OffscreenSurface.java
similarity index 100%
rename from src/com/android/grafika/gles/OffscreenSurface.java
rename to grafika/src/main/java/com/android/grafika/gles/OffscreenSurface.java
diff --git a/src/com/android/grafika/gles/Sprite2d.java b/grafika/src/main/java/com/android/grafika/gles/Sprite2d.java
similarity index 100%
rename from src/com/android/grafika/gles/Sprite2d.java
rename to grafika/src/main/java/com/android/grafika/gles/Sprite2d.java
diff --git a/src/com/android/grafika/gles/Texture2dProgram.java b/grafika/src/main/java/com/android/grafika/gles/Texture2dProgram.java
similarity index 100%
rename from src/com/android/grafika/gles/Texture2dProgram.java
rename to grafika/src/main/java/com/android/grafika/gles/Texture2dProgram.java
diff --git a/src/com/android/grafika/gles/WindowSurface.java b/grafika/src/main/java/com/android/grafika/gles/WindowSurface.java
similarity index 100%
rename from src/com/android/grafika/gles/WindowSurface.java
rename to grafika/src/main/java/com/android/grafika/gles/WindowSurface.java
diff --git a/res/drawable-hdpi/ic_launcher.png b/grafika/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-hdpi/ic_launcher.png
rename to grafika/src/main/res/drawable-hdpi/ic_launcher.png
diff --git a/res/drawable-mdpi/ic_launcher.png b/grafika/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-mdpi/ic_launcher.png
rename to grafika/src/main/res/drawable-mdpi/ic_launcher.png
diff --git a/res/drawable-xhdpi/ic_launcher.png b/grafika/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xhdpi/ic_launcher.png
rename to grafika/src/main/res/drawable-xhdpi/ic_launcher.png
diff --git a/res/drawable-xxhdpi/ic_launcher.png b/grafika/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_launcher.png
rename to grafika/src/main/res/drawable-xxhdpi/ic_launcher.png
diff --git a/res/drawable/back.xml b/grafika/src/main/res/drawable/back.xml
similarity index 100%
rename from res/drawable/back.xml
rename to grafika/src/main/res/drawable/back.xml
diff --git a/res/layout-land/activity_double_decode.xml b/grafika/src/main/res/layout-land/activity_double_decode.xml
similarity index 100%
rename from res/layout-land/activity_double_decode.xml
rename to grafika/src/main/res/layout-land/activity_double_decode.xml
diff --git a/res/layout/about_dialog.xml b/grafika/src/main/res/layout/about_dialog.xml
similarity index 100%
rename from res/layout/about_dialog.xml
rename to grafika/src/main/res/layout/about_dialog.xml
diff --git a/res/layout/activity_camera_capture.xml b/grafika/src/main/res/layout/activity_camera_capture.xml
similarity index 100%
rename from res/layout/activity_camera_capture.xml
rename to grafika/src/main/res/layout/activity_camera_capture.xml
diff --git a/res/layout/activity_chor_test.xml b/grafika/src/main/res/layout/activity_chor_test.xml
similarity index 100%
rename from res/layout/activity_chor_test.xml
rename to grafika/src/main/res/layout/activity_chor_test.xml
diff --git a/res/layout/activity_codec_open.xml b/grafika/src/main/res/layout/activity_codec_open.xml
similarity index 100%
rename from res/layout/activity_codec_open.xml
rename to grafika/src/main/res/layout/activity_codec_open.xml
diff --git a/res/layout/activity_color_bar.xml b/grafika/src/main/res/layout/activity_color_bar.xml
similarity index 100%
rename from res/layout/activity_color_bar.xml
rename to grafika/src/main/res/layout/activity_color_bar.xml
diff --git a/res/layout/activity_continuous_capture.xml b/grafika/src/main/res/layout/activity_continuous_capture.xml
similarity index 100%
rename from res/layout/activity_continuous_capture.xml
rename to grafika/src/main/res/layout/activity_continuous_capture.xml
diff --git a/res/layout/activity_double_decode.xml b/grafika/src/main/res/layout/activity_double_decode.xml
similarity index 100%
rename from res/layout/activity_double_decode.xml
rename to grafika/src/main/res/layout/activity_double_decode.xml
diff --git a/res/layout/activity_gles_info.xml b/grafika/src/main/res/layout/activity_gles_info.xml
similarity index 100%
rename from res/layout/activity_gles_info.xml
rename to grafika/src/main/res/layout/activity_gles_info.xml
diff --git a/res/layout/activity_hardware_scaler.xml b/grafika/src/main/res/layout/activity_hardware_scaler.xml
similarity index 100%
rename from res/layout/activity_hardware_scaler.xml
rename to grafika/src/main/res/layout/activity_hardware_scaler.xml
diff --git a/res/layout/activity_main.xml b/grafika/src/main/res/layout/activity_main.xml
similarity index 100%
rename from res/layout/activity_main.xml
rename to grafika/src/main/res/layout/activity_main.xml
diff --git a/res/layout/activity_multi_surface_test.xml b/grafika/src/main/res/layout/activity_multi_surface_test.xml
similarity index 100%
rename from res/layout/activity_multi_surface_test.xml
rename to grafika/src/main/res/layout/activity_multi_surface_test.xml
diff --git a/res/layout/activity_play_movie.xml b/grafika/src/main/res/layout/activity_play_movie.xml
similarity index 100%
rename from res/layout/activity_play_movie.xml
rename to grafika/src/main/res/layout/activity_play_movie.xml
diff --git a/res/layout/activity_play_movie_surface.xml b/grafika/src/main/res/layout/activity_play_movie_surface.xml
similarity index 100%
rename from res/layout/activity_play_movie_surface.xml
rename to grafika/src/main/res/layout/activity_play_movie_surface.xml
diff --git a/res/layout/activity_read_pixels.xml b/grafika/src/main/res/layout/activity_read_pixels.xml
similarity index 100%
rename from res/layout/activity_read_pixels.xml
rename to grafika/src/main/res/layout/activity_read_pixels.xml
diff --git a/res/layout/activity_record_fbo.xml b/grafika/src/main/res/layout/activity_record_fbo.xml
similarity index 100%
rename from res/layout/activity_record_fbo.xml
rename to grafika/src/main/res/layout/activity_record_fbo.xml
diff --git a/res/layout/activity_scheduled_swap.xml b/grafika/src/main/res/layout/activity_scheduled_swap.xml
similarity index 100%
rename from res/layout/activity_scheduled_swap.xml
rename to grafika/src/main/res/layout/activity_scheduled_swap.xml
diff --git a/res/layout/activity_soft_input_surface.xml b/grafika/src/main/res/layout/activity_soft_input_surface.xml
similarity index 100%
rename from res/layout/activity_soft_input_surface.xml
rename to grafika/src/main/res/layout/activity_soft_input_surface.xml
diff --git a/res/layout/activity_texture_from_camera.xml b/grafika/src/main/res/layout/activity_texture_from_camera.xml
similarity index 100%
rename from res/layout/activity_texture_from_camera.xml
rename to grafika/src/main/res/layout/activity_texture_from_camera.xml
diff --git a/res/layout/activity_texture_upload.xml b/grafika/src/main/res/layout/activity_texture_upload.xml
similarity index 100%
rename from res/layout/activity_texture_upload.xml
rename to grafika/src/main/res/layout/activity_texture_upload.xml
diff --git a/res/layout/activity_texture_view_canvas.xml b/grafika/src/main/res/layout/activity_texture_view_canvas.xml
similarity index 100%
rename from res/layout/activity_texture_view_canvas.xml
rename to grafika/src/main/res/layout/activity_texture_view_canvas.xml
diff --git a/res/layout/activity_texture_view_gl.xml b/grafika/src/main/res/layout/activity_texture_view_gl.xml
similarity index 100%
rename from res/layout/activity_texture_view_gl.xml
rename to grafika/src/main/res/layout/activity_texture_view_gl.xml
diff --git a/res/layout/work_dialog.xml b/grafika/src/main/res/layout/work_dialog.xml
similarity index 100%
rename from res/layout/work_dialog.xml
rename to grafika/src/main/res/layout/work_dialog.xml
diff --git a/res/menu/main.xml b/grafika/src/main/res/menu/main.xml
similarity index 100%
rename from res/menu/main.xml
rename to grafika/src/main/res/menu/main.xml
diff --git a/res/values-sw600dp/dimens.xml b/grafika/src/main/res/values-sw600dp/dimens.xml
similarity index 100%
rename from res/values-sw600dp/dimens.xml
rename to grafika/src/main/res/values-sw600dp/dimens.xml
diff --git a/res/values-sw720dp-land/dimens.xml b/grafika/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from res/values-sw720dp-land/dimens.xml
rename to grafika/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/res/values-v11/styles.xml b/grafika/src/main/res/values-v11/styles.xml
similarity index 100%
rename from res/values-v11/styles.xml
rename to grafika/src/main/res/values-v11/styles.xml
diff --git a/res/values-v14/styles.xml b/grafika/src/main/res/values-v14/styles.xml
similarity index 100%
rename from res/values-v14/styles.xml
rename to grafika/src/main/res/values-v14/styles.xml
diff --git a/res/values/dimens.xml b/grafika/src/main/res/values/dimens.xml
similarity index 100%
rename from res/values/dimens.xml
rename to grafika/src/main/res/values/dimens.xml
diff --git a/res/values/strings.xml b/grafika/src/main/res/values/strings.xml
similarity index 100%
rename from res/values/strings.xml
rename to grafika/src/main/res/values/strings.xml
diff --git a/res/values/styles.xml b/grafika/src/main/res/values/styles.xml
similarity index 100%
rename from res/values/styles.xml
rename to grafika/src/main/res/values/styles.xml
diff --git a/libs/android-support-v4.jar b/libs/android-support-v4.jar
deleted file mode 100644
index 9056828a..00000000
Binary files a/libs/android-support-v4.jar and /dev/null differ
diff --git a/project.properties b/project.properties
deleted file mode 100644
index 4ab12569..00000000
--- a/project.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=android-19
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 00000000..6e46d77a
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':grafika'