Skip to content

Commit e2a39b6

Browse files
authored
Merge pull request leenjewel#49 from AsteriskZuo/master
update shell scripts for Android and iOS
2 parents 26dfa01 + a977b42 commit e2a39b6

File tree

172 files changed

+38087
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+38087
-284
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ tools/curl*
99
tools/openssl*
1010
tools/protobuf*
1111
output/
12+
.xcuserstate

example/android/.idea/modules.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/android/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/android/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Android studio info:
2+
Android Studio 3.4
3+
Build #AI-183.5429.30.34.5452501, built on April 10, 2019
4+
JRE: 1.8.0_152-release-1343-b01 x86_64
5+
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
6+
macOS 10.14.2

example/android/app/build.gradle

Lines changed: 0 additions & 43 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.

example/android/app/src/main/cpp/native-lib.cpp

Lines changed: 0 additions & 39 deletions
This file was deleted.

example/android/app/src/main/java/com/github/leenjewel/openssl_and_curl/MainActivity.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

example/android/app/src/main/res/layout/activity_main.xml

Lines changed: 0 additions & 41 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

example/android/app/src/main/res/values/colors.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/android/app/src/main/res/values/strings.xml

Lines changed: 0 additions & 3 deletions
This file was deleted.
-52.4 KB
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild

example/android/test_cpphttplib_for_app_on_android/.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/android/test_cpphttplib_for_app_on_android/.idea/gradle.xml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/android/test_cpphttplib_for_app_on_android/.idea/misc.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/android/test_cpphttplib_for_app_on_android/.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/android/test_cpphttplib_for_app_on_android/.idea/vcs.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 28
5+
defaultConfig {
6+
applicationId "com.citylife.test_cpphttplib_for_app_on_android"
7+
minSdkVersion 21
8+
targetSdkVersion 28
9+
versionCode 1
10+
versionName "1.0"
11+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12+
externalNativeBuild {
13+
cmake {
14+
cppFlags ""
15+
arguments '-DANDROID_TOOLCHAIN=clang',
16+
'-DANDROID_STL=c++_shared',
17+
'-DANDROID_ARM_NEON=TRUE',
18+
"-DANDROID_CPP_FEATURES=rtti exceptions"
19+
// '-DANDROID_ABI=arm64-v8a'
20+
abiFilters 'arm64-v8a'
21+
}
22+
}
23+
}
24+
buildTypes {
25+
release {
26+
minifyEnabled false
27+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
28+
}
29+
}
30+
externalNativeBuild {
31+
cmake {
32+
path "src/main/cpp/CMakeLists.txt"
33+
version "3.10.2"
34+
}
35+
}
36+
}
37+
38+
dependencies {
39+
implementation fileTree(dir: 'libs', include: ['*.jar'])
40+
implementation 'com.android.support:appcompat-v7:28.0.0'
41+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
42+
testImplementation 'junit:junit:4.12'
43+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
44+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
45+
}

example/android/app/proguard-rules.pro renamed to example/android/test_cpphttplib_for_app_on_android/app/proguard-rules.pro

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Add project specific ProGuard rules here.
2-
# By default, the flags in this file are appended to flags specified
3-
# in /Users/leenjewel/Dev/android-sdk-macosx/tools/proguard/proguard-android.txt
4-
# You can edit the include path and order by changing the proguardFiles
5-
# directive in build.gradle.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
64
#
75
# For more details, see
86
# http://developer.android.com/guide/developing/tools/proguard.html
97

10-
# Add any project specific keep options here:
11-
128
# If your project uses WebView with JS, uncomment the following
139
# and specify the fully qualified class name to the JavaScript interface
1410
# class:
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.leenjewel.openssl_and_curl;
1+
package com.citylife.test_cpphttplib_for_app_on_android;
22

33
import android.content.Context;
44
import android.support.test.InstrumentationRegistry;
@@ -10,17 +10,17 @@
1010
import static org.junit.Assert.*;
1111

1212
/**
13-
* Instrumentation test, which will execute on an Android device.
13+
* Instrumented test, which will execute on an Android device.
1414
*
1515
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
1616
*/
1717
@RunWith(AndroidJUnit4.class)
1818
public class ExampleInstrumentedTest {
1919
@Test
20-
public void useAppContext() throws Exception {
20+
public void useAppContext() {
2121
// Context of the app under test.
2222
Context appContext = InstrumentationRegistry.getTargetContext();
2323

24-
assertEquals("com.github.leenjewel.openssl_and_curl", appContext.getPackageName());
24+
assertEquals("com.citylife.test_cpphttplib_for_app_on_android", appContext.getPackageName());
2525
}
2626
}

example/android/app/src/main/AndroidManifest.xml renamed to example/android/test_cpphttplib_for_app_on_android/app/src/main/AndroidManifest.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.github.leenjewel.openssl_and_curl" >
3+
package="com.citylife.test_cpphttplib_for_app_on_android">
4+
<uses-permission android:name="android.permission.INTERNET" />
5+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
6+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
7+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
8+
49

510
<application
611
android:allowBackup="true"
712
android:icon="@mipmap/ic_launcher"
813
android:label="@string/app_name"
914
android:roundIcon="@mipmap/ic_launcher_round"
1015
android:supportsRtl="true"
11-
android:theme="@style/AppTheme" >
12-
<activity android:name=".MainActivity" >
16+
android:theme="@style/AppTheme">
17+
<activity android:name=".MainActivity">
1318
<intent-filter>
1419
<action android:name="android.intent.action.MAIN" />
1520

0 commit comments

Comments
 (0)