-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ndk: set APP_BUILD_SCRIPT for makefile parameter instead of -f
-added integration test project
- Loading branch information
Showing
8 changed files
with
112 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/test/projects/native/native-code-nonstandard-structure/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
libs | ||
obj |
7 changes: 7 additions & 0 deletions
7
src/test/projects/native/native-code-nonstandard-structure/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.acme.hellojni" | ||
android:versionCode="1" | ||
android:versionName="1.0"> | ||
<uses-sdk android:minSdkVersion="3" /> | ||
</manifest> |
47 changes: 47 additions & 0 deletions
47
src/test/projects/native/native-code-nonstandard-structure/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (C) 2015 CNH Industrial NV. All rights reserved. | ||
~ | ||
~ This software contains proprietary information of CNH Industrial NV. Neither | ||
~ receipt nor possession thereof confers any right to reproduce, use, or | ||
~ disclose in whole or in part any such information without written | ||
~ authorization from CNH Industrial NV. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | ||
http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.jayway.maven.plugins.android.generation2.samples</groupId> | ||
<artifactId>native-parent</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>native-code-nonstandard-structure</artifactId> | ||
<!-- | ||
Packaging is defined as 'so' - this will indicate to the Maven Android | ||
plugin that it is meant to compile the native code. The resulting native | ||
library is attached to the build | ||
--> | ||
<packaging>so</packaging> | ||
|
||
<name>Android NDK - Native Sample Non-standard folder structure</name> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.simpligility.maven.plugins</groupId> | ||
|
||
<artifactId>android-maven-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<ndkArchitectures>x86 armeabi</ndkArchitectures> | ||
<makefile>src/Android.mk</makefile> | ||
<applicationMakefile>src/Application.mk</applicationMakefile> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
22 changes: 22 additions & 0 deletions
22
src/test/projects/native/native-code-nonstandard-structure/src/Android.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (C) 2009 The Android Open Source Project | ||
# | ||
# 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. | ||
# | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
include $(CLEAR_VARS) | ||
|
||
LOCAL_MODULE := native-code | ||
LOCAL_SRC_FILES := hello-jni.c | ||
|
||
include $(BUILD_SHARED_LIBRARY) |
1 change: 1 addition & 0 deletions
1
src/test/projects/native/native-code-nonstandard-structure/src/Application.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
APP_ABI := armeabi x86 |
31 changes: 31 additions & 0 deletions
31
src/test/projects/native/native-code-nonstandard-structure/src/hello-jni.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (C) 2009 The Android Open Source Project | ||
* | ||
* 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. | ||
* | ||
*/ | ||
#include <string.h> | ||
#include <jni.h> | ||
|
||
/* This is a trivial JNI example where we use a native method | ||
* to return a new VM String. See the corresponding Java source | ||
* file located at: | ||
* | ||
* apps/samples/hello-jni/project/src/com/example/HelloJni/HelloJni.java | ||
*/ | ||
jstring | ||
Java_com_acme_hellojni_HelloJni_stringFromJNI( JNIEnv* env, | ||
jobject thiz ) | ||
{ | ||
return (*env)->NewStringUTF(env, "Hello from Native JNI!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters