Browse Source

add submodules, fix paths

pull/18/head
R4SAS 4 years ago
parent
commit
ea3c05173e
  1. 13
      .gitmodules
  2. 26
      app/build.gradle
  3. 8
      app/jni/Android.mk
  4. 24
      app/jni/Application.mk
  5. 1
      app/jni/android-ifaddrs
  6. 1
      app/jni/boost
  7. 1
      app/jni/miniupnp
  8. 1
      app/jni/openssl
  9. 20
      app/proguard-project.txt
  10. 1
      settings.gradle

13
.gitmodules vendored

@ -2,3 +2,16 @@ @@ -2,3 +2,16 @@
path = app/jni/i2pd
url = https://github.com/PurpleI2P/i2pd.git
branch = openssl
[submodule "app/jni/boost"]
path = app/jni/boost
url = https://github.com/PurpleI2P/Boost-for-Android-Prebuilt.git
branch = boost-1_72_0
[submodule "app/jni/openssl"]
path = app/jni/openssl
url = https://github.com/PurpleI2P/OpenSSL-for-Android-Prebuilt.git
[submodule "app/jni/miniupnp"]
path = app/jni/miniupnp
url = https://github.com/PurpleI2P/MiniUPnP-for-Android-Prebuilt.git
[submodule "app/jni/android-ifaddrs"]
path = app/jni/android-ifaddrs
url = https://github.com/PurpleI2P/android-ifaddrs.git

26
app/build.gradle

@ -9,6 +9,7 @@ dependencies { @@ -9,6 +9,7 @@ dependencies {
android {
compileSdkVersion 29
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "org.purplei2p.i2pd"
targetSdkVersion 29
@ -16,37 +17,33 @@ android { @@ -16,37 +17,33 @@ android {
versionCode 2321
versionName "2.32.1"
setProperty("archivesBaseName", archivesBaseName + "-" + versionName)
ndk {
abiFilters 'armeabi-v7a'
abiFilters 'x86'
//abiFilters 'arm64-v8a'
//abiFilters 'x86_64'
abiFilters 'arm64-v8a'
abiFilters 'x86_64'
}
externalNativeBuild {
ndkBuild {
arguments "NDK_MODULE_PATH:=${rootProject.projectDir}/app/jni"
arguments "-j3"
}
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
jniLibs.srcDirs = ['libs']
assets.srcDirs = ['assets']
}
}
splits {
abi {
// change that to true if you need splitted apk
enable true
reset()
//include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
include "armeabi-v7a", "x86"
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
//include "armeabi-v7a", "x86"
universalApk true
}
}
signingConfigs {
orignal {
storeFile file("i2pdapk.jks")
@ -55,6 +52,7 @@ android { @@ -55,6 +52,7 @@ android {
keyPassword "android"
}
}
buildTypes {
release {
minifyEnabled false
@ -62,11 +60,13 @@ android { @@ -62,11 +60,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
externalNativeBuild {
ndkBuild {
path './jni/Android.mk'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'

8
app/jni/Android.mk

@ -57,15 +57,15 @@ include $(PREBUILT_STATIC_LIBRARY) @@ -57,15 +57,15 @@ include $(PREBUILT_STATIC_LIBRARY)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := crypto
LOCAL_SRC_FILES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/$(TARGET_ARCH_ABI)/lib/libcrypto.a
LOCAL_EXPORT_C_INCLUDES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/include
LOCAL_SRC_FILES := $(OPENSSL_PATH)/openssl-1.1.1d-clang/$(TARGET_ARCH_ABI)/lib/libcrypto.a
LOCAL_EXPORT_C_INCLUDES := $(OPENSSL_PATH)/openssl-1.1.1d-clang/include
include $(PREBUILT_STATIC_LIBRARY)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ssl
LOCAL_SRC_FILES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/$(TARGET_ARCH_ABI)/lib/libssl.a
LOCAL_EXPORT_C_INCLUDES := $(OPENSSL_PATH)/openssl-1.1.1a-clang/include
LOCAL_SRC_FILES := $(OPENSSL_PATH)/openssl-1.1.1d-clang/$(TARGET_ARCH_ABI)/lib/libssl.a
LOCAL_EXPORT_C_INCLUDES := $(OPENSSL_PATH)/openssl-1.1.1d-clang/include
LOCAL_STATIC_LIBRARIES := crypto
include $(PREBUILT_STATIC_LIBRARY)

24
app/jni/Application.mk

@ -1,12 +1,4 @@ @@ -1,12 +1,4 @@
#APP_ABI := armeabi-v7a x86
#APP_PLATFORM := android-14
# ABI arm64-v8a and x86_64 supported only from platform-21
#APP_ABI := arm64-v8a x86_64
#APP_PLATFORM := android-21
NDK_TOOLCHAIN_VERSION := clang
#APP_STL := c++_shared
APP_STL := c++_static
# Enable c++17 extensions in source code
@ -17,19 +9,13 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) @@ -17,19 +9,13 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
APP_CPPFLAGS += -DANDROID_ARM7A
endif
# git clone https://github.com/PurpleI2P/Boost-for-Android-Prebuilt.git -b boost-1_72_0
# git clone https://github.com/PurpleI2P/OpenSSL-for-Android-Prebuilt.git
# git clone https://github.com/PurpleI2P/MiniUPnP-for-Android-Prebuilt.git
# git clone https://github.com/PurpleI2P/android-ifaddrs.git
# change to your own
I2PD_LIBS_PATH = /path/to/libraries
BOOST_PATH = $(I2PD_LIBS_PATH)/Boost-for-Android-Prebuilt
OPENSSL_PATH = $(I2PD_LIBS_PATH)/OpenSSL-for-Android-Prebuilt
MINIUPNP_PATH = $(I2PD_LIBS_PATH)/MiniUPnP-for-Android-Prebuilt
IFADDRS_PATH = $(I2PD_LIBS_PATH)/android-ifaddrs
BOOST_PATH = $(NDK_MODULE_PATH)/boost
OPENSSL_PATH = $(NDK_MODULE_PATH)/openssl
MINIUPNP_PATH = $(NDK_MODULE_PATH)/miniupnp
IFADDRS_PATH = $(NDK_MODULE_PATH)/android-ifaddrs
# don't change me
I2PD_SRC_PATH = $(PWD)/..
I2PD_SRC_PATH = $(NDK_MODULE_PATH)/i2pd
LIB_SRC_PATH = $(I2PD_SRC_PATH)/libi2pd
LIB_CLIENT_SRC_PATH = $(I2PD_SRC_PATH)/libi2pd_client

1
app/jni/android-ifaddrs

@ -0,0 +1 @@ @@ -0,0 +1 @@
Subproject commit 8f9a87cd8d1a9c0cd1219f1ab9ef4ad1947cae30

1
app/jni/boost

@ -0,0 +1 @@ @@ -0,0 +1 @@
Subproject commit 93de5720b8841569f25abe9fe498348582e002c4

1
app/jni/miniupnp

@ -0,0 +1 @@ @@ -0,0 +1 @@
Subproject commit dd9bad896ba8ff49c3399e5c1624643a0b667e50

1
app/jni/openssl

@ -0,0 +1 @@ @@ -0,0 +1 @@
Subproject commit 98d7f124a1873333e0b8d2b5c0640a26185197a9

20
app/proguard-project.txt

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

1
settings.gradle

@ -1,2 +1 @@ @@ -1,2 +1 @@
include ':app'
app.name = "i2pd"

Loading…
Cancel
Save