[email protected] 8 years ago
parent
commit
058da76f5e

+ 1 - 0
.gitignore

@@ -30,3 +30,4 @@ examples/HelloFlow/proj.android/.gradle/
 *.db
 *.db
 *.dll
 *.dll
 examples/HelloFlow/proj.win32/HelloFlow.VC.VC.opendb
 examples/HelloFlow/proj.win32/HelloFlow.VC.VC.opendb
+**/.externalNativeBuild

+ 2 - 1
examples/HelloFlow/proj.android/AndroidManifest.xml

@@ -15,7 +15,8 @@
                   android:label="@string/app_name"
                   android:label="@string/app_name"
                   android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                   android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                   android:configChanges="locale|orientation|keyboardHidden|screenSize" 
                   android:configChanges="locale|orientation|keyboardHidden|screenSize" 
-                  android:screenOrientation="landscape">
+                  android:screenOrientation="sensorLandscape"
+                  android:launchMode="singleTask">
 
 
             <intent-filter>
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <action android:name="android.intent.action.MAIN" />

+ 2 - 2
examples/HelloFlow/proj.android/build-run.bat

@@ -1,4 +1,4 @@
-call ndk-build NDK_MODULE_PATH="../../../../"
+rem call ndk-build NDK_MODULE_PATH="../../../../"
 call gradlew assembleDebug
 call gradlew assembleDebug
-call adb install -r build/outputs/apk/proj.android-debug.apk
+call adb install -r build/outputs/apk/debug/proj.android-debug.apk
 call adb shell am start -n org.oxygine.HelloFlow/org.oxygine.HelloFlow.MainActivity
 call adb shell am start -n org.oxygine.HelloFlow/org.oxygine.HelloFlow.MainActivity

+ 2 - 2
examples/HelloFlow/proj.android/build-run.sh

@@ -1,6 +1,6 @@
 #!/usr/bin/env sh
 #!/usr/bin/env sh
 
 
-ndk-build NDK_MODULE_PATH="../../../../"
+#ndk-build NDK_MODULE_PATH="../../../../"
 gradlew assembleDebug
 gradlew assembleDebug
-adb install -r build/outputs/apk/proj.android-debug.apk
+adb install -r build/outputs/apk/debug/proj.android-debug.apk
 adb shell am start -n org.oxygine.HelloFlow/org.oxygine.HelloFlow.MainActivity
 adb shell am start -n org.oxygine.HelloFlow/org.oxygine.HelloFlow.MainActivity

+ 23 - 6
examples/HelloFlow/proj.android/build.gradle

@@ -3,9 +3,10 @@ buildscript {
         mavenLocal()
         mavenLocal()
         mavenCentral()
         mavenCentral()
         jcenter()
         jcenter()
+        google()
     }
     }
     dependencies {
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.+'
+        classpath 'com.android.tools.build:gradle:3.0.1'
     }
     }
 }
 }
 
 
@@ -14,15 +15,13 @@ apply plugin: 'com.android.application'
 
 
 
 
 dependencies {
 dependencies {
-    compile(project(':oxygine-extension'))
-    compile(project(':oxygine-lib')) { exclude module: 'oxygine-extension' }
+    implementation(project(':oxygine-extension'))
+    implementation(project(':oxygine-lib')) { exclude module: 'oxygine-extension' }
 }
 }
 
 
 android {
 android {
-    enforceUniquePackageName=false
         
         
     compileSdkVersion 23
     compileSdkVersion 23
-    buildToolsVersion '23.0.2'
 
 
 
 
     sourceSets {
     sourceSets {
@@ -35,8 +34,26 @@ android {
         }
         }
     }
     }
 
 
+    defaultConfig {
+        ndk {
+            abiFilters 'armeabi-v7a'//, 'arm64-v8a'
+        }
+
+        externalNativeBuild {
+            ndkBuild {
+                arguments 'NDK_MODULE_PATH+=../../../../'
+            }
+        }
+    }
+
+    externalNativeBuild {
+        ndkBuild {
+            path 'jni/Android.mk'
+        }
+    }
+
     aaptOptions {
     aaptOptions {
         noCompress 'zip', 'ogg'
         noCompress 'zip', 'ogg'
-        ignoreAssetsPattern "!*.dll:*.icf"
+        ignoreAssetsPattern "!*.dll"
     }
     }
 }
 }

+ 2 - 2
examples/HelloFlow/proj.android/gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,6 @@
-#Fri Feb 03 15:44:28 YEKT 2017
+#Wed Nov 01 12:35:02 YEKT 2017
 distributionBase=GRADLE_USER_HOME
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

+ 4 - 4
examples/HelloFlow/src/main.cpp

@@ -4,9 +4,9 @@
     If you just started here and don't understand the code completely, feel free to come back later.
     If you just started here and don't understand the code completely, feel free to come back later.
     You can start from example.cpp and example.h, which main functions are called from here.
     You can start from example.cpp and example.h, which main functions are called from here.
 */
 */
-#include "oxygine/core/oxygine.h"
-#include "oxygine/Stage.h"
-#include "oxygine/DebugActor.h"
+#include "ox/oxygine.hpp"
+#include "ox/Stage.hpp"
+#include "ox/DebugActor.hpp"
 #include "example.h"
 #include "example.h"
 
 
 
 
@@ -63,7 +63,7 @@ void run()
 
 
 
 
     // Create the stage. Stage is a root node for all updateable and drawable objects
     // Create the stage. Stage is a root node for all updateable and drawable objects
-    Stage::instance = new Stage(true);
+    Stage::instance = new Stage();
     Point size = core::getDisplaySize();
     Point size = core::getDisplaySize();
     getStage()->setSize(size);
     getStage()->setSize(size);