android: Migrate to the Gradle build system
This uses a manual way to trigger the NDK build (the default with on-the-fly Android.mk files does not work for us).
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
|
||||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
|
||||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
|
||||||
<classpathentry kind="src" path="src"/>
|
|
||||||
<classpathentry kind="src" path="gen"/>
|
|
||||||
<classpathentry kind="output" path="bin/classes"/>
|
|
||||||
</classpath>
|
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
bin/
|
.gradle/
|
||||||
gen/
|
.idea/
|
||||||
libs/
|
app/build/
|
||||||
obj/
|
app/src/main/libs
|
||||||
|
app/src/main/obj
|
||||||
|
*.iml
|
||||||
|
local.properties
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
To build this within the NDK several things have to be added in the jni
|
To build this within the NDK several things have to be added in the
|
||||||
folder:
|
app/src/main/jni/ folder:
|
||||||
|
|
||||||
- strongswan: The strongSwan sources. This can either be an extracted tarball,
|
- strongswan: The strongSwan sources. This can either be an extracted tarball,
|
||||||
or a symlink to the Git repository. To build from the repository the sources
|
or a symlink to the Git repository. To build from the repository the sources
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 21
|
||||||
|
buildToolsVersion "22.0.1"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "org.strongswan.android"
|
||||||
|
minSdkVersion 15
|
||||||
|
targetSdkVersion 22
|
||||||
|
versionCode 28
|
||||||
|
versionName "1.5.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets.main {
|
||||||
|
jni.srcDirs = [] // disables the default ndk-build call (with on-the-fly Android.mk files)
|
||||||
|
jniLibs.srcDir 'src/main/libs'
|
||||||
|
}
|
||||||
|
|
||||||
|
task buildNative(type: Exec) {
|
||||||
|
workingDir 'src/main/jni'
|
||||||
|
commandLine "${android.ndkDirectory}/ndk-build", '-j', Runtime.runtime.availableProcessors()
|
||||||
|
}
|
||||||
|
|
||||||
|
task cleanNative(type: Exec) {
|
||||||
|
workingDir 'src/main/jni'
|
||||||
|
commandLine "${android.ndkDirectory}/ndk-build", 'clean'
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
compileTask -> compileTask.dependsOn buildNative
|
||||||
|
}
|
||||||
|
|
||||||
|
clean.dependsOn 'cleanNative'
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-5
@@ -16,11 +16,7 @@
|
|||||||
for more details.
|
for more details.
|
||||||
-->
|
-->
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.strongswan.android"
|
package="org.strongswan.android">
|
||||||
android:versionCode="28"
|
|
||||||
android:versionName="1.5.0" >
|
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="22" />
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user