GeezerVison is showing github.com — add:travis ci自动化编译 · 11446/AndroidHttpCapture@6cb5da6
File tree
Expand file treeCollapse file tree
Open diff view settings
java/cn/darkal/networkdiagnosis
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +28Lines changed: 28 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +language: android |
| 2 | +jdk: oraclejdk8 |
| 3 | +dist: trusty |
| 4 | +global_env: _JAVA_OPTIONS=-Xmx4g |
| 5 | + |
| 6 | +android: |
| 7 | + components: |
| 8 | + - build-tools-24.0.3 |
| 9 | + - android-22 |
| 10 | + - sys-img-armeabi-v7a-android-22 |
| 11 | + - android-24 |
| 12 | + - extra-android-m2repository |
| 13 | + - extra-android-support |
| 14 | + licenses: |
| 15 | + - android-sdk-license-.+ |
| 16 | + - '.+' |
| 17 | +before_script: |
| 18 | + - wget http://services.gradle.org/distributions/gradle-2.14.1-bin.zip |
| 19 | + - unzip gradle-2.14.1-bin.zip |
| 20 | + - export GRADLE_HOME=$PWD/gradle-2.14.1 |
| 21 | + - export PATH=$GRADLE_HOME/bin:$PATH |
| 22 | + - mkdir "$ANDROID_HOME/licenses" || true |
| 23 | + - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license" |
| 24 | + - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license" |
| 25 | + - echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a |
| 26 | + - emulator -avd test -no-audio -no-window & |
| 27 | + - android-wait-for-emulator |
| 28 | + - adb shell input keyevent 82 & |
Collapse file
Copy file name to clipboardExpand all lines: app/build.gradle +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -3,6 +3,7 @@ apply plugin: 'android-apt' |
3 | 3 | apply plugin: 'bugly' |
4 | 4 |
|
5 | 5 | bugly { |
| 6 | + upload = false |
6 | 7 | appId = 'db9f598223' // 注册时分配的App ID |
7 | 8 | appKey = '119ae85f-0c0b-485c-8ae2-da08e472b9e2' // 注册时分配的App Key |
8 | 9 | } |
@@ -16,6 +17,9 @@ android { |
16 | 17 | storePassword '333333' |
17 | 18 | } |
18 | 19 | } |
| 20 | + dexOptions { |
| 21 | + javaMaxHeapSize "4g" |
| 22 | + } |
19 | 23 | compileSdkVersion 24 |
20 | 24 | buildToolsVersion '24.0.3' |
21 | 25 | dataBinding { |
@@ -60,6 +64,9 @@ android { |
60 | 64 | } |
61 | 65 | productFlavors { |
62 | 66 | } |
| 67 | + lintOptions { |
| 68 | + abortOnError false |
| 69 | + } |
63 | 70 | } |
64 | 71 |
|
65 | 72 | dependencies { |
|
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/AndroidManifest.xml +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
22 | 22 | android:icon="@mipmap/ic_launcher" |
23 | 23 | android:label="@string/app_name" |
24 | 24 | android:largeHeap="true" |
| 25 | + android:resizeableActivity="true" |
25 | 26 | android:supportsRtl="true" |
26 | 27 | android:theme="@style/AppTheme"> |
27 | 28 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/java/cn/darkal/networkdiagnosis/SysApplication.java +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
23 | 23 | import java.text.SimpleDateFormat; |
24 | 24 | import java.util.ArrayList; |
25 | 25 | import java.util.Date; |
| 26 | +import java.util.LinkedList; |
26 | 27 | import java.util.List; |
27 | 28 | import java.util.Locale; |
28 | 29 | import java.util.Random; |
@@ -38,7 +39,7 @@ public class SysApplication extends MultiDexApplication { |
38 | 39 | public static Boolean isInitProxy = false; |
39 | 40 | public static int proxyPort = 8888; |
40 | 41 | public BrowserMobProxy proxy; |
41 | | - public List<ResponseFilterRule> ruleList; |
| 42 | + public List<ResponseFilterRule> ruleList = new ArrayList<>(); |
42 | 43 |
|
43 | 44 | @Override |
44 | 45 | public void onCreate() { |
|
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/java/cn/darkal/networkdiagnosis/Utils/DeviceUtils.java +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -80,6 +80,8 @@ public static void changeHost(BrowserMobProxy browserMobProxy,String newValue){ |
80 | 80 | Log.e("~~~~remapHost ", temp.split(" ")[1] + " " + temp.split(" ")[0]); |
81 | 81 | } |
82 | 82 | } |
| 83 | + |
| 84 | + |
83 | 85 | browserMobProxy.setHostNameResolver(advancedHostResolver); |
84 | 86 | } |
85 | 87 |
|
|
Collapse file
Copy file name to clipboard +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +#Mon Dec 28 10:00:20 PST 2015 |
| 2 | +distributionBase=GRADLE_USER_HOME |
| 3 | +distributionPath=wrapper/dists |
| 4 | +zipStoreBase=GRADLE_USER_HOME |
| 5 | +zipStorePath=wrapper/dists |
| 6 | +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip |