Skip to content

Commit 1c15230

Browse files
RxJava+Retrofit+OKhttp
1 parent acfc35f commit 1c15230

File tree

1,371 files changed

+57488
-0
lines changed

Some content is hidden

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

1,371 files changed

+57488
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

.idea/gradle.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/sonarlint/issuestore/1/d/1de50180da55ed4a4efe5c4c09eefa3c70058aa9

Whitespace-only changes.

.idea/sonarlint/issuestore/6/3/634ad735292106bbf6022ba3550d63c4407a63a0

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35

Whitespace-only changes.

.idea/sonarlint/issuestore/index.pb

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'org.greenrobot.greendao' // apply plugin
3+
4+
def keystorePropertiesFile = rootProject.file("keystore.properties")
5+
def keystoreProperties = new Properties()
6+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
7+
8+
def releaseTime() {
9+
return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
10+
}
11+
12+
13+
android {
14+
compileSdkVersion 26
15+
defaultConfig {
16+
applicationId "com.isoftstone.huidingc.testqmui"
17+
minSdkVersion 19
18+
targetSdkVersion 26
19+
versionCode 1
20+
versionName "1.0"
21+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
22+
vectorDrawables.useSupportLibrary = true
23+
}
24+
25+
//GreenDao配置
26+
greendao {
27+
//版本号,升级是可配置
28+
schemaVersion 1
29+
daoPackage 'com.isoftstone.huidingc.testqmui.greendao'
30+
targetGenDir 'src/main/java'
31+
}
32+
33+
buildTypes {
34+
release {
35+
minifyEnabled false
36+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
37+
}
38+
}
39+
40+
//配置打包需要的key
41+
signingConfigs {
42+
config {
43+
storeFile file(keystoreProperties['storeFile'])
44+
storePassword keystoreProperties['storePassword']
45+
keyAlias keystoreProperties['keyAlias']
46+
keyPassword keystoreProperties['keyPassword']
47+
}
48+
}
49+
}
50+
51+
dependencies {
52+
implementation fileTree(include: ['*.jar'], dir: 'libs')
53+
implementation 'com.android.support:appcompat-v7:27.0.2'
54+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
55+
implementation 'com.android.support:design:26.1.0'
56+
implementation 'com.android.support:support-vector-drawable:26.1.0'
57+
testImplementation 'junit:junit:4.12'
58+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
59+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
60+
//QMUI_Android
61+
//compile 'com.qmuiteam:qmui:1.0.6'
62+
//Glide图片加载库
63+
//implementation 'com.github.bumptech.glide:glide:3.7.0'
64+
implementation 'com.github.bumptech.glide:glide:4.5.0'
65+
annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'
66+
//黄油刀
67+
compile 'com.jakewharton:butterknife:8.8.1'
68+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
69+
//GreenDao add library
70+
compile 'org.greenrobot:greendao:3.2.2'
71+
//设置沉浸式
72+
compile 'com.gyf.barlibrary:barlibrary:2.3.0'
73+
//gson
74+
compile 'com.google.code.gson:gson:2.8.2'
75+
//Retrofit+RxJava+OKHttp
76+
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
77+
compile 'io.reactivex.rxjava2:rxjava:2.1.9'
78+
compile 'com.squareup.retrofit2:retrofit:2.3.0'
79+
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
80+
compile 'com.squareup.retrofit2:converter-scalars:2.3.0'
81+
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
82+
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
83+
compile 'com.squareup.okhttp3:logging-interceptor:3.9.1'
84+
//权限申请
85+
compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar'
86+
//图片选择
87+
implementation project(':matisse')
88+
//进度条
89+
compile 'com.daimajia.numberprogressbar:library:1.4@aar'
90+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.isoftstone.huidingc.testqmui;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("com.isoftstone.huidingc.testqmui", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.isoftstone.huidingc.testqmui">
4+
5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
7+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
8+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
9+
<uses-permission android:name="android.permission.CAMERA"/>
10+
11+
<application
12+
android:name=".base.BaseApplication"
13+
android:allowBackup="true"
14+
android:icon="@mipmap/ic_launcher"
15+
android:label="@string/app_name"
16+
android:roundIcon="@mipmap/ic_launcher_round"
17+
android:supportsRtl="true"
18+
android:theme="@style/AppTheme">
19+
<activity
20+
android:name=".activity.MainActivity"
21+
android:configChanges="orientation|keyboardHidden|screenSize"
22+
android:screenOrientation="portrait">
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN" />
25+
26+
<category android:name="android.intent.category.LAUNCHER" />
27+
</intent-filter>
28+
</activity>
29+
30+
<!-- 7.0之后访问私有目录文件需要FileProvider -->
31+
<provider
32+
android:name="android.support.v4.content.FileProvider"
33+
android:authorities="com.isoftstone.huidingc.testqmui.fileprovider"
34+
android:exported="false"
35+
android:grantUriPermissions="true">
36+
<meta-data
37+
android:name="android.support.FILE_PROVIDER_PATHS"
38+
android:resource="@xml/provider_paths" />
39+
</provider>
40+
</application>
41+
42+
</manifest>

0 commit comments

Comments
 (0)