Skip to content

Commit 873e83b

Browse files
johnb003Gerrit Code Review
authored and
Gerrit Code Review
committed
Merge "Fixed a few warnings and disabled abort on lint."
2 parents 13a6a53 + 9d6f243 commit 873e83b

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ The steps are:
149149

150150

151151
## Building the Plugin
152-
To build the plugin run `./gradlew build_all`. This builds the support aar
153-
library, and packages the plugin into a .unitypackage file. It also packages the
154-
sample scene and script in a separate package.
152+
To build the plugin run `./gradlew -PlintAbortOnError build_all`. This builds the support aar
153+
library with lint warnings as errors and packages the plugin into a .unitypackage file. It
154+
also packages the sample scene and script in a separate package.
155+
156+
There's also a shortcut for linux/mac: `./build_all`.
155157

156158

157159
## Questions? Problems?

build_all.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
readonly THIS_DIR="$(cd "$(dirname "$0")"; pwd)"
3+
pushd ${THIS_DIR}
4+
./gradlew -PlintAbortOnError="true" build_all
5+
popd

native-googlesignin/build.gradle

+6-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ project.ext.baseName = "google-signin-support"
3333

3434
android {
3535
compileSdkVersion 26
36-
buildToolsVersion "25.0.3"
36+
buildToolsVersion "26.0.3"
3737
defaultConfig {
3838
minSdkVersion 14
3939
targetSdkVersion 26
@@ -48,6 +48,11 @@ android {
4848
abiFilters 'x86', 'armeabi-v7a'
4949
}
5050
}
51+
lintOptions {
52+
abortOnError (project.hasProperty("lintAbortOnError") &&
53+
(project.lintAbortOnError == "" ||
54+
project.lintAbortOnError.toBoolean()))
55+
}
5156
buildTypes {
5257
release {
5358
minifyEnabled false

native-googlesignin/src/main/cpp/google_signin.cc

+2
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ class GoogleSignIn::GoogleSignInImpl {
139139
};
140140

141141
const JNINativeMethod GoogleSignIn::GoogleSignInImpl::methods[] = {
142+
{
142143
NATIVEONRESULT_METHOD_NAME,
143144
NATIVEONRESULT_METHOD_SIG,
144145
reinterpret_cast<void *>(
145146
GoogleSignIn::GoogleSignInImpl::NativeOnAuthResult),
147+
},
146148
};
147149

148150
jclass GoogleSignIn::GoogleSignInImpl::helper_clazz_ = 0;

native-googlesignin/src/main/cpp/google_signin_bridge.h

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// primarily by the Unity plugin.
2121

2222
#include <jni.h>
23+
#include <stddef.h>
2324

2425
struct GoogleSignInHolder;
2526
typedef GoogleSignInHolder* GoogleSignIn_t;

native-googlesignin/src/main/cpp/google_signin_user.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void GoogleSignInUserImpl::Initialize(jobject obj) {
101101

102102
jclass uri_class = FindClass(URI_NAME, obj);
103103
method_uri_toString = env->GetMethodID(
104-
google_acct_class, TOSTRING_METHOD_NAME, TOSTRING_METHOD_SIG);
104+
uri_class, TOSTRING_METHOD_NAME, TOSTRING_METHOD_SIG);
105105

106106
method_getServerAuthCode =
107107
env->GetMethodID(google_acct_class, GETSERVERAUTHCODE_METHOD_NAME,

0 commit comments

Comments
 (0)