Skip to content

Commit 273bc14

Browse files
committed
test
1 parent dce8c37 commit 273bc14

17 files changed

+1171
-0
lines changed

build.gradle

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'me.tatarka.retrolambda'
3+
android {
4+
compileSdkVersion rootProject.ext.compileSdkVersion
5+
buildToolsVersion rootProject.ext.buildToolsVersion
6+
7+
defaultConfig {
8+
minSdkVersion rootProject.ext.minSdkVersion
9+
targetSdkVersion rootProject.ext.targetSdkVersion
10+
versionCode rootProject.ext.versionCode
11+
versionName rootProject.ext.versionName
12+
13+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14+
15+
}
16+
buildTypes {
17+
release {
18+
minifyEnabled false
19+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20+
}
21+
}
22+
compileOptions {
23+
targetCompatibility 1.8
24+
sourceCompatibility 1.8
25+
}
26+
lintOptions {
27+
abortOnError false
28+
}
29+
}
30+
buildscript {
31+
repositories {
32+
jcenter()
33+
34+
}
35+
dependencies {
36+
classpath "me.tatarka:gradle-retrolambda:3.6.0"
37+
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
38+
39+
}
40+
}
41+
dependencies {
42+
compile fileTree(dir: 'libs', include: ['*.jar'])
43+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
44+
exclude group: 'com.android.support', module: 'support-annotations'
45+
})
46+
compile project(':data')
47+
compile project(':eswiLib')
48+
//adapter 自动依赖retrofit2和RxJava2
49+
compile "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0"
50+
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
51+
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
52+
//adapter 自动依赖retrofit2和RxJava2
53+
compile "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0"
54+
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
55+
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
56+
//使用OkHttp作为下载引擎,OkHttp已经在httpLib中依赖了
57+
compile 'com.liulishuo.filedownloader:library:1.4.2'
58+
//自动依赖okHttp3
59+
compile "com.squareup.okhttp3:logging-interceptor:3.6.0"
60+
61+
compile('com.tencent.cos:cos:4.3.2+@aar') {
62+
transitive = false
63+
}
64+
65+
testCompile 'junit:junit:4.12'
66+
67+
}
68+
task makeJar(type:Copy){
69+
delete 'build/libs/httpLib.jar'
70+
from('build/intermediates/bundels/release/')
71+
into('build/libs')
72+
include('classes.jar')
73+
rename('classess.jar','httpLib.jar')
74+
}

proguard-rules.pro

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in G:\SDK/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
# Uncomment this to preserve the line number information for
20+
# debugging stack traces.
21+
#-keepattributes SourceFile,LineNumberTable
22+
23+
# If you keep the line number information, uncomment this to
24+
# hide the original source file name.
25+
#-renamesourcefileattribute SourceFile

src/main/AndroidManifest.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
3+
package="com.eswi.httpLib"
4+
>
5+
<uses-permission android:name="android.permission.INTERNET"/>
6+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
7+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
8+
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
9+
<uses-permission android:name="android.permission.WAKE_LOCK"/>
10+
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
11+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
12+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
13+
<application android:allowBackup="true"
14+
android:label="@string/app_name"
15+
android:supportsRtl="true"
16+
>
17+
18+
</application>
19+
20+
</manifest>
Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
package com.eswi.httpLib;
2+
3+
/**
4+
* Created by admin on 2016/8/24.
5+
*/
6+
public class BaseParamsBean {
7+
public String getCode() {
8+
return code;
9+
}
10+
11+
public void setCode(String code) {
12+
this.code = code;
13+
}
14+
15+
private String code;
16+
17+
public String getId() {
18+
return id;
19+
}
20+
21+
public void setId(String id) {
22+
this.id = id;
23+
}
24+
25+
private String id;
26+
private String name;
27+
private String oldPassword;
28+
private String newPassword;
29+
private String courseChapterId;
30+
private String device_id;
31+
private String student_id;
32+
private String school_id;
33+
private String extra;
34+
35+
public String getVersion() {
36+
return version;
37+
}
38+
39+
public void setVersion(String version) {
40+
this.version = version;
41+
}
42+
43+
public String getDevice_id() {
44+
return device_id;
45+
}
46+
47+
public void setDevice_id(String device_id) {
48+
this.device_id = device_id;
49+
}
50+
51+
public String getStudent_id() {
52+
return student_id;
53+
}
54+
55+
public void setStudent_id(String student_id) {
56+
this.student_id = student_id;
57+
}
58+
59+
public String getSchool_id() {
60+
return school_id;
61+
}
62+
63+
public void setSchool_id(String school_id) {
64+
this.school_id = school_id;
65+
}
66+
67+
private String version;
68+
69+
public String getImageUuids() {
70+
return imageUuids;
71+
}
72+
73+
public void setImageUuids(String imageUuids) {
74+
this.imageUuids = imageUuids;
75+
}
76+
77+
private String imageUuids;
78+
79+
public String getStr() {
80+
return str;
81+
}
82+
83+
public void setStr(String str) {
84+
this.str = str;
85+
}
86+
87+
private String str;
88+
89+
public String getSixWhyType() {
90+
return sixWhyType;
91+
}
92+
93+
public void setSixWhyType(String sixWhyType) {
94+
this.sixWhyType = sixWhyType;
95+
}
96+
97+
public String getCourseChapterId() {
98+
return courseChapterId;
99+
}
100+
101+
public void setCourseChapterId(String courseChapterId) {
102+
this.courseChapterId = courseChapterId;
103+
}
104+
105+
private String sixWhyType;
106+
107+
public String getAnswerStudentStr() {
108+
return answerStudentStr;
109+
}
110+
111+
public void setAnswerStudentStr(String answerStudentStr) {
112+
this.answerStudentStr = answerStudentStr;
113+
}
114+
115+
private String answerStudentStr;
116+
117+
public String getLogoAttachmentId() {
118+
return logoAttachmentId;
119+
}
120+
121+
public void setLogoAttachmentId(String logoAttachmentId) {
122+
this.logoAttachmentId = logoAttachmentId;
123+
}
124+
125+
private String logoAttachmentId;
126+
private String content;
127+
private String date;
128+
private String type;
129+
private String target;
130+
131+
public String getAttachmentId() {
132+
return attachmentId;
133+
}
134+
135+
public void setAttachmentId(String attachmentId) {
136+
this.attachmentId = attachmentId;
137+
}
138+
139+
public String getNodeId() {
140+
return nodeId;
141+
}
142+
143+
public void setNodeId(String nodeId) {
144+
this.nodeId = nodeId;
145+
}
146+
147+
private String attachmentId;
148+
private String nodeId;
149+
150+
public String getCourseId() {
151+
return courseId;
152+
}
153+
154+
public void setCourseId(String courseId) {
155+
this.courseId = courseId;
156+
}
157+
158+
public String getName() {
159+
return name;
160+
}
161+
162+
public void setName(String name) {
163+
this.name = name;
164+
}
165+
166+
public String getOldPassword() {
167+
return oldPassword;
168+
}
169+
170+
public void setOldPassword(String oldPassword) {
171+
this.oldPassword = oldPassword;
172+
}
173+
174+
public String getNewPassword() {
175+
return newPassword;
176+
}
177+
178+
public void setNewPassword(String newPassword) {
179+
this.newPassword = newPassword;
180+
}
181+
182+
public String getExtra() {
183+
return extra;
184+
}
185+
186+
public void setExtra(String mExtra) {
187+
extra = mExtra;
188+
}
189+
190+
public String getContent() {
191+
return content;
192+
}
193+
194+
public void setContent(String content) {
195+
this.content = content;
196+
}
197+
198+
public String getDate() {
199+
return date;
200+
}
201+
202+
public void setDate(String date) {
203+
this.date = date;
204+
}
205+
206+
public String getType() {
207+
return type;
208+
}
209+
210+
public void setType(String type) {
211+
this.type = type;
212+
}
213+
214+
public String getTarget() {
215+
return target;
216+
}
217+
218+
public void setTarget(String target) {
219+
this.target = target;
220+
}
221+
222+
private String courseId;
223+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
package com.eswi.httpLib;
2+
3+
import com.eswi.data.mapper.CurriculumInfo;
4+
import com.eswi.data.mapper.NewsInfo;
5+
import com.eswi.data.mapper.UserInfoDTO;
6+
import com.eswi.data.upload.CosInfo;
7+
8+
import java.util.Map;
9+
10+
import io.reactivex.Flowable;
11+
import okhttp3.RequestBody;
12+
import retrofit2.http.Body;
13+
import retrofit2.http.Headers;
14+
import retrofit2.http.POST;
15+
16+
/**
17+
* Created by Terry on 2017/3/21.
18+
*/
19+
20+
public interface EswiFloawableService {
21+
String CONTENT_TYPE = "Content-Type: application/json;charset=UTF-8";
22+
23+
@Headers({CONTENT_TYPE})
24+
@POST("student/login")
25+
Flowable<UserInfoDTO> login(@Body RequestBody code);
26+
27+
28+
29+
30+
31+
32+
33+
34+
@POST("file/cos/signature")
35+
Flowable<CosInfo> getCosSignature(
36+
@Body Map<String, Object> params);
37+
38+
39+
40+
41+
42+
43+
44+
@POST("curriculum/current")
45+
Flowable<CurriculumInfo> getCurriculum();
46+
@POST("homework/unfinish/count")
47+
Flowable<NewsInfo> getHomeworkNews();
48+
@POST("wrong/exercises/new")
49+
Flowable<NewsInfo> getErrorCollectionNews();
50+
}

0 commit comments

Comments
 (0)