diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2017-12-18 00:16:25 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2017-12-18 00:16:25 +0000 |
| commit | 9615db1e25e3b1ed12a71bff0384072c0c473ae8 (patch) | |
| tree | 53a83a5388468fae3d9fd9664378b035f2d6b668 /unityplugin/Android/GhostCubeScene | |
| parent | One final update to appveyor script (diff) | |
| download | DiligentEngine-9615db1e25e3b1ed12a71bff0384072c0c473ae8.tar.gz DiligentEngine-9615db1e25e3b1ed12a71bff0384072c0c473ae8.zip | |
Added gradle build for Unity plugin; updated submodules
Diffstat (limited to 'unityplugin/Android/GhostCubeScene')
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/build.gradle | 44 | ||||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/AndroidManifest.xml | 31 | ||||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/layout/widgets.xml | 17 | ||||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/mipmap-hdpi/ic_launcher.png | bin | 0 -> 3418 bytes | |||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/mipmap-mdpi/ic_launcher.png | bin | 0 -> 2206 bytes | |||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/mipmap-xhdpi/ic_launcher.png | bin | 0 -> 4842 bytes | |||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/mipmap-xxhdpi/ic_launcher.png | bin | 0 -> 7718 bytes | |||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/values-v11/styles.xml | 11 | ||||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/values-v14/styles.xml | 12 | ||||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/values/strings.xml | 7 | ||||
| -rw-r--r-- | unityplugin/Android/GhostCubeScene/src/main/res/values/styles.xml | 20 |
11 files changed, 142 insertions, 0 deletions
diff --git a/unityplugin/Android/GhostCubeScene/build.gradle b/unityplugin/Android/GhostCubeScene/build.gradle new file mode 100644 index 0000000..886985f --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/build.gradle @@ -0,0 +1,44 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion = 25 + + defaultConfig { + applicationId = 'com.DiligentGraphics.UnityEmulator.UnityEmulatorApplication' + minSdkVersion 21 + targetSdkVersion 25 + ndk { + abiFilters 'armeabi-v7a'//, 'armeabi', 'arm64-v8a','x86', 'x86_64' + } + externalNativeBuild { + cmake { + arguments '-DANDROID_PLATFORM=android-21', + '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_static' + } + } + } + buildTypes { + release { + minifyEnabled = false + proguardFiles getDefaultProguardFile('proguard-android.txt'), + 'proguard-rules.pro' + } + } + externalNativeBuild { + cmake { + path '../../../CMakeLists.txt' + } + } + sourceSets { + main { + java.srcDirs = ['../Common/Java'] + assets.srcDirs = ['../../GhostCubeScene/build/assets'] + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:25.4.0' + implementation 'com.android.support.constraint:constraint-layout:1.0.1' +} diff --git a/unityplugin/Android/GhostCubeScene/src/main/AndroidManifest.xml b/unityplugin/Android/GhostCubeScene/src/main/AndroidManifest.xml new file mode 100644 index 0000000..bc885c2 --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/AndroidManifest.xml @@ -0,0 +1,31 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" +package="com.DiligentGraphics.UnityEmulator" +android:versionCode="1" +android:versionName="1.0" > + +<uses-feature android:glEsVersion="0x00030000" android:required="true"></uses-feature> +<application + android:allowBackup="false" + android:fullBackupContent="false" + android:supportsRtl="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:theme="@style/AppTheme" + android:name="com.DiligentGraphics.UnityEmulator.UnityEmulatorApplication" + > + + <!-- Our activity is the built-in NativeActivity framework class. + This will take care of integrating with our NDK code. --> + <activity android:name="com.DiligentGraphics.UnityEmulator.UnityEmulatorNativeActivity" + android:label="@string/app_name" + android:configChanges="orientation|keyboardHidden"> + <!-- Tell NativeActivity the name of our .so --> + <meta-data android:name="android.app.lib_name" + android:value="GhostCubeScene" /> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> +</application> +</manifest> diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/layout/widgets.xml b/unityplugin/Android/GhostCubeScene/src/main/res/layout/widgets.xml new file mode 100644 index 0000000..b6e86e6 --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/layout/widgets.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="top" + android:orientation="vertical" > + + <TextView + android:id="@+id/textViewFPS" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="end" + android:text="@string/fps" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="@android:color/white" /> + +</LinearLayout>
\ No newline at end of file diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-hdpi/ic_launcher.png b/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..cde69bc --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-mdpi/ic_launcher.png b/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..c133a0c --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-xhdpi/ic_launcher.png b/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..bfa42f0 --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-xxhdpi/ic_launcher.png b/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 0000000..324e72c --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/values-v11/styles.xml b/unityplugin/Android/GhostCubeScene/src/main/res/values-v11/styles.xml new file mode 100644 index 0000000..541752f --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/values-v11/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- + Base application theme for API 11+. This theme completely replaces + AppBaseTheme from res/values/styles.xml on API 11+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> + <!-- API 11 theme customizations can go here. --> + </style> + +</resources>
\ No newline at end of file diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/values-v14/styles.xml b/unityplugin/Android/GhostCubeScene/src/main/res/values-v14/styles.xml new file mode 100644 index 0000000..f20e015 --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/values-v14/styles.xml @@ -0,0 +1,12 @@ +<resources> + + <!-- + Base application theme for API 14+. This theme completely replaces + AppBaseTheme from BOTH res/values/styles.xml and + res/values-v11/styles.xml on API 14+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> + <!-- API 14 theme customizations can go here. --> + </style> + +</resources>
\ No newline at end of file diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/values/strings.xml b/unityplugin/Android/GhostCubeScene/src/main/res/values/strings.xml new file mode 100644 index 0000000..546c209 --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/values/strings.xml @@ -0,0 +1,7 @@ +<resources> + + <string name="app_name">Ghost Cube Scene Unity Emulator</string> + <string name="plugin_name">GhostCubePlugin</string> + <string name="fps">0.0 FPS</string> + +</resources>
\ No newline at end of file diff --git a/unityplugin/Android/GhostCubeScene/src/main/res/values/styles.xml b/unityplugin/Android/GhostCubeScene/src/main/res/values/styles.xml new file mode 100644 index 0000000..4a10ca4 --- /dev/null +++ b/unityplugin/Android/GhostCubeScene/src/main/res/values/styles.xml @@ -0,0 +1,20 @@ +<resources> + + <!-- + Base application theme, dependent on API level. This theme is replaced + by AppBaseTheme from res/values-vXX/styles.xml on newer devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Light"> + <!-- + Theme customizations available in newer API levels can go in + res/values-vXX/styles.xml, while customizations related to + backward-compatibility can go here. + --> + </style> + + <!-- Application theme. --> + <style name="AppTheme" parent="AppBaseTheme"> + <!-- All customizations that are NOT specific to a particular API-level can go here. --> + </style> + +</resources>
\ No newline at end of file |
