Skip to content

Commit a2bb392

Browse files
committed
Copied old native files to a new structure without modification.
Change-Id: Ib1da59d3fe61467438ea665b89457e9ad0c04985
1 parent 9d6f243 commit a2bb392

13 files changed

+1510
-0
lines changed

staging/DIR_README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This directory is a temporary staging area for reassembling the native C++ API.
2+
3+
When done, the contents of this folder will be merged into the parent folder,
4+
and replace the existing native wrappers.

staging/native/src/CMakeLists.txt

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright (C) 2017 Google Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
##
15+
16+
# For more information about using CMake with Android Studio, read the
17+
# documentation: https://d.android.com/studio/projects/add-native-code.html
18+
19+
# Sets the minimum version of CMake required to build the native library.
20+
21+
cmake_minimum_required(VERSION 3.4.1)
22+
23+
# Creates and names a library, sets it as either STATIC
24+
# or SHARED, and provides the relative paths to its source code.
25+
# You can define multiple libraries, and CMake builds them for you.
26+
# Gradle automatically packages shared libraries with your APK.
27+
28+
add_library( # Sets the name of the library.
29+
native-googlesignin
30+
31+
# Sets the library as a shared library.
32+
SHARED
33+
34+
# Provides a relative path to your source file(s).
35+
src/main/cpp/google_signin_bridge.cc
36+
src/main/cpp/google_signin.cc
37+
src/main/cpp/google_signin_user.cc
38+
src/main/cpp/jni.cc)
39+
40+
# Searches for a specified prebuilt library and stores the path as a
41+
# variable. Because CMake includes system libraries in the search path by
42+
# default, you only need to specify the name of the public NDK library
43+
# you want to add. CMake verifies that the library exists before
44+
# completing its build.
45+
46+
find_library( # Sets the name of the path variable.
47+
log-lib
48+
49+
# Specifies the name of the NDK library that
50+
# you want CMake to locate.
51+
log )
52+
53+
# Specifies libraries CMake should link to your target library. You
54+
# can link multiple libraries, such as libraries you define in this
55+
# build script, prebuilt third-party libraries, or system libraries.
56+
57+
target_link_libraries( # Specifies the target library.
58+
native-googlesignin
59+
60+
# Links the target library to the log library
61+
# included in the NDK.
62+
${log-lib} )
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright (C) 2017 Google Inc.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18+
package="com.google.nativelib.googlesignin">
19+
20+
<application/>
21+
22+
</manifest>

0 commit comments

Comments
 (0)