File tree 6 files changed +54
-35
lines changed
6 files changed +54
-35
lines changed Original file line number Diff line number Diff line change 1
- /.gradle
2
- /.idea
3
- /build
4
- * /build
5
- /captures
6
- /.cxx
7
- * /.cxx
8
- /.externalNativeBuild
1
+ .gradle
2
+ .idea
3
+ .cxx
4
+ .externalNativeBuild
5
+ build
6
+ captures
9
7
10
8
._ *
11
9
* .iml
Original file line number Diff line number Diff line change 2
2
3
3
* 码云地址:[ Gitee] ( https://gitee.com/getActivity/GsonFactory )
4
4
5
- #### Gradle 集成
5
+ #### 集成步骤
6
+
7
+ * 在项目根目录下的 ` build.gradle ` 文件中加入
6
8
7
9
``` groovy
10
+ buildscript {
11
+ ......
12
+ }
13
+ allprojects {
14
+ repositories {
15
+ // JitPack 远程仓库:https://jitpack.io
16
+ maven { url 'https://jitpack.io' }
17
+ }
18
+ }
19
+ ```
20
+
21
+ * 在项目 app 模块下的 ` build.gradle ` 文件中加入
22
+
23
+ ``` groovy
24
+ android {
25
+ // 支持 JDK 1.8
26
+ compileOptions {
27
+ targetCompatibility JavaVersion.VERSION_1_8
28
+ sourceCompatibility JavaVersion.VERSION_1_8
29
+ }
30
+ }
31
+
8
32
dependencies {
9
33
// Gson 解析容错:https://github.com/getActivity/GsonFactory
10
- implementation 'com.hjq.gson:factory :5.2'
34
+ implementation 'com.github.getActivity:GsonFactory :5.2'
11
35
// Json 解析框架:https://github.com/google/gson
12
36
implementation 'com.google.code.gson:gson:2.8.5'
13
37
}
Original file line number Diff line number Diff line change 1
1
<resources >
2
- <string name =" app_name" >GsonFactoryDemo </string >
2
+ <string name =" app_name" >GsonFactory </string >
3
3
</resources >
Original file line number Diff line number Diff line change 1
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
2
-
3
1
buildscript {
4
2
repositories {
5
- jcenter()
3
+ // 阿里云云效仓库:https://maven.aliyun.com/mvn/guide
4
+ maven { url ' https://maven.aliyun.com/repository/jcenter' }
5
+ maven { url ' https://maven.aliyun.com/repository/google' }
6
+ // 华为开源镜像:https://mirrors.huaweicloud.com/
7
+ maven { url ' https://repo.huaweicloud.com/repository/maven/' }
8
+ // JitPack 远程仓库:https://jitpack.io
9
+ maven { url ' https://jitpack.io' }
10
+ mavenCentral()
6
11
google()
12
+ jcenter()
7
13
}
8
14
dependencies {
9
- classpath ' com.android.tools.build:gradle:3.4.0'
10
- classpath ' com.novoda:bintray-release:0.9.2'
15
+ classpath ' com.android.tools.build:gradle:4.1.2'
11
16
}
12
17
}
13
18
14
19
allprojects {
15
20
repositories {
16
- jcenter()
21
+ maven { url ' https://maven.aliyun.com/repository/jcenter' }
22
+ maven { url ' https://maven.aliyun.com/repository/google' }
23
+ maven { url ' https://repo.huaweicloud.com/repository/maven/' }
24
+ maven { url ' https://jitpack.io' }
25
+ mavenCentral()
17
26
google()
18
- maven {url " https://jitpack.io " }
27
+ jcenter()
19
28
}
20
29
}
21
30
Original file line number Diff line number Diff line change 1
- # Wed Jul 18 11:21:06 CST 2018
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-5.4.1-all.zip
1
+ zipStoreBase = GRADLE_USER_HOME
2
+ zipStorePath = wrapper/dists
3
+ distributionBase = GRADLE_USER_HOME
4
+ distributionPath = wrapper/dists
5
+ distributionUrl = https\://services.gradle.org/distributions/gradle-6.5-all.zip
Original file line number Diff line number Diff line change 1
- // 文件开头配置
2
1
apply plugin : ' com.android.library'
3
- apply plugin : ' com.novoda.bintray-release'
4
2
5
3
android {
6
4
compileSdkVersion 26
@@ -18,15 +16,6 @@ dependencies {
18
16
implementation ' com.google.code.gson:gson:2.8.5'
19
17
}
20
18
21
- publish {
22
- userOrg = ' getactivity'
23
- groupId = ' com.hjq.gson'
24
- artifactId = ' factory'
25
- publishVersion = ' 5.2'
26
- desc = ' Gson parsing fault-tolerant framework'
27
- website = " https://github.com/getActivity/GsonFactory"
28
- }
29
-
30
19
// 防止编码问题
31
20
tasks. withType(Javadoc ) {
32
21
options. addStringOption(' Xdoclint:none' , ' -quiet' )
You can’t perform that action at this time.
0 commit comments