Skip to content

Commit

Permalink
Updating Turnbased sample to use CMake, GPGS 3.0
Browse files Browse the repository at this point in the history
Change-Id: Id7033b884b195b1efaf93dbb0828d12b27793fc2
  • Loading branch information
claywilkinson committed Jan 2, 2018
1 parent 1a6e96e commit cb3184b
Show file tree
Hide file tree
Showing 26 changed files with 105 additions and 3,843 deletions.
57 changes: 34 additions & 23 deletions samples-android/TbmpSkeletonNative/build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
/*
* Copyright 2017 (C) Google LLC
* 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'

// Depend on another project that downloads and unzips the C++ SDK.
evaluationDependsOn(':Common/gpg-sdk')

// As the plugin has created the build tasks, add the gpg-sdk task to
// the task dependencies so it gets done before compiling
tasks.whenTaskAdded { task ->
project(':Common/gpg-sdk').defaultTasks.each {
t ->task.dependsOn project(':Common/gpg-sdk').tasks[t]

}
}

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
compileSdkVersion 26
defaultConfig {
//
// REPLACE THE APPLICATION ID with your bundle ID
//
applicationId "com.google.example.games.ReplaceMe"
minSdkVersion 14
targetSdkVersion 23
targetSdkVersion 26

ndk.abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'

externalNativeBuild {
cmake {
cppFlags "-std=c++11 -Wall -frtti"
arguments "-DJUI_HELPER_PATH=${project(':Common:JuiHelper').projectDir}" ,
"-DNDK_HELPER_PATH=${project(':Common:NDKHelper').projectDir}" ,
"-DGPG_SDK_PATH=${project(':Common:gpg-sdk').projectDir}/gpg-cpp-sdk/android",
"-DJSON_PATH=${project(':Common:gpg-sdk').projectDir}/../external/jsoncpp/",
"-DTEAPOT_RENDERER_PATH=${project(':Common').projectDir}/TeapotRenderer" ,
"-DANDROID_STL=c++_static"
}

ndk {
abiFilters 'x86', 'armeabi-v7a'
}
}

externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
cmake.path "CMakeLists.txt"
}
}

dependencies {
compile 'com.google.android.gms:play-services-games:10.0.0'
compile 'com.google.android.gms:play-services-nearby:10.0.0'
compile 'com.android.support:support-v4:23.1.1'
implementation project(":Common:JuiHelper")
implementation 'com.google.android.gms:play-services-games:11.6.2'
implementation 'com.google.android.gms:play-services-nearby:11.6.2'
implementation 'com.android.support:support-v4:26.1.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@

public class TBMPSkeletonApplication extends Application {
public void onCreate() {
super.onCreate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class TBMPSkeletonNativeActivity extends NativeActivity {
// Load SO
static {
System.load("libTBMPSkeletonNativeActivity.so");
System.loadLibrary("TBMPSkeletonNativeActivity");
}

@Override
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cb3184b

Please sign in to comment.