aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2019-10-12 21:18:01 +0530
committerHarsh Shandilya <msfjarvis@gmail.com>2019-10-12 21:18:01 +0530
commit937803fe1dcb6903d8f4b013e5e6bd1f483b158f (patch)
tree072b7c23a2b63294928831f7a89feeec6272dbea
parentnative: Re-add submodules (diff)
downloadwireguard-android-hs/gradle-reorganisation.tar.xz
wireguard-android-hs/gradle-reorganisation.zip
build: Wire up native subprojecths/gradle-reorganisation
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
-rw-r--r--app/build.gradle16
-rw-r--r--native/build.gradle33
-rw-r--r--native/src/main/AndroidManifest.xml1
-rw-r--r--settings.gradle2
4 files changed, 36 insertions, 16 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 9a90a3e..21da091 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -41,27 +41,12 @@ android {
buildTypes {
release {
if (keystorePropertiesFile.exists()) signingConfig signingConfigs.release
- externalNativeBuild {
- cmake {
- arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}"
- }
- }
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
- externalNativeBuild {
- cmake {
- arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}${applicationIdSuffix}"
- }
- }
- }
- }
- externalNativeBuild {
- cmake {
- path 'tools/CMakeLists.txt'
}
}
}
@@ -84,6 +69,7 @@ ext {
}
dependencies {
+ implementation project(":native")
implementation "androidx.annotation:annotation:$annotationsVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation "androidx.cardview:cardview:$cardviewVersion"
diff --git a/native/build.gradle b/native/build.gradle
new file mode 100644
index 0000000..38ca5bf
--- /dev/null
+++ b/native/build.gradle
@@ -0,0 +1,33 @@
+apply plugin: 'com.android.library'
+
+android {
+ buildToolsVersion '29.0.2'
+ compileSdkVersion 29
+ defaultConfig {
+ minSdkVersion 21
+ targetSdkVersion 29
+ versionCode 1
+ versionName '1.0'
+ }
+ buildTypes {
+ release {
+ externalNativeBuild {
+ cmake {
+ arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}"
+ }
+ }
+ }
+ debug {
+ externalNativeBuild {
+ cmake {
+ arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}${applicationIdSuffix}"
+ }
+ }
+ }
+ }
+ externalNativeBuild {
+ cmake {
+ path 'tools/CMakeLists.txt'
+ }
+ }
+}
diff --git a/native/src/main/AndroidManifest.xml b/native/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..6848d15
--- /dev/null
+++ b/native/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
+<manifest package="com.wireguard.android.native_libs" />
diff --git a/settings.gradle b/settings.gradle
index e7b4def..678748a 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1 @@
-include ':app'
+include ':app', ':native'