Skip to content

Commit 219e6e2

Browse files
committed
更新依赖、迁移到mavenCentral
1 parent 3e1b3ed commit 219e6e2

File tree

15 files changed

+105
-136
lines changed

15 files changed

+105
-136
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
> 开发环境
2525
26-
AndroidStudio 4.1.+
27-
Gradle 6.5
26+
AndroidStudio 2020.3.1
27+
Gradle 7.0.2
2828

2929
## 必读事项
3030

@@ -70,8 +70,8 @@
7070
7171
``` groovy
7272
buildFeatures {
73-
viewBinding = true
74-
dataBinding = true
73+
viewBinding true
74+
dataBinding true
7575
}
7676
```
7777
@@ -90,7 +90,7 @@
9090
dirs '../libs'
9191
}
9292
93-
// ... jcenter() 等其他仓库
93+
// ... mavenCentral() 等其他仓库
9494
}
9595
}
9696
```
@@ -114,18 +114,18 @@
114114
# 导入指南
115115
116116
``` groovy
117-
def quicklib = "4.5.0"
117+
def quicklib = "4.6.0"
118118
119119
// quicklib(Base)
120-
implementation "com.sdwfqin.quicklib:quicklib:$quicklib"
121-
annotationProcessor "com.qmuiteam:arch-compiler:2.0.0-alpha10"
120+
implementation "io.github.sdwfqin.android:quicklib:$quicklib"
121+
annotationProcessor "com.qmuiteam:arch-compiler:2.0.1"
122122
annotationProcessor "com.alibaba:arouter-compiler:1.2.2"
123123
// 支付模块
124-
implementation "com.sdwfqin.quicklib:paylib:$quicklib"
124+
implementation "io.github.sdwfqin.android:paylib:$quicklib"
125125
// Android 图片加载库(Glide封装)
126-
implementation "com.sdwfqin.quicklib:imageloader:$quicklib"
126+
implementation "io.github.sdwfqin.android:imageloader:$quicklib"
127127
// Android 自定义View组件
128-
implementation "com.sdwfqin.quicklib:widget:$quicklib"
128+
implementation "io.github.sdwfqin.android:widget:$quicklib"
129129
```
130130

131131
# 目录介绍

app-kt/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ android {
1515
}
1616

1717
compileSdkVersion rootProject.ext.androidVersion.compileSdkVersion
18-
buildToolsVersion rootProject.ext.androidVersion.buildToolsVersion
1918

2019
defaultConfig {
2120
applicationId "io.github.sdwfqin.app_kt"
@@ -57,8 +56,8 @@ android {
5756
}
5857

5958
buildFeatures {
60-
viewBinding = true
61-
dataBinding = true
59+
viewBinding true
60+
dataBinding true
6261
}
6362
}
6463

app/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ android {
1212
}
1313

1414
compileSdkVersion rootProject.ext.androidVersion.compileSdkVersion
15-
buildToolsVersion rootProject.ext.androidVersion.buildToolsVersion
1615

1716
defaultConfig {
1817
applicationId "com.sdwfqin.quickseed"
@@ -53,8 +52,8 @@ android {
5352
}
5453

5554
buildFeatures {
56-
viewBinding = true
57-
dataBinding = true
55+
viewBinding true
56+
dataBinding true
5857
}
5958
}
6059

build.gradle

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@ apply from: "config.gradle"
33
buildscript {
44

55
ext {
6-
kotlin_version = '1.5.10'
7-
hilt_version = '2.36'
6+
kotlin_version = '1.5.30'
7+
hilt_version = '2.38.1'
88
}
99

1010
repositories {
1111
google()
12-
jcenter()
1312
mavenCentral()
1413
maven { url 'https://jitpack.io' }
14+
jcenter() // Warning: this repository is going to shut down soon
1515
}
1616
dependencies {
17-
classpath 'com.android.tools.build:gradle:4.2.1'
18-
// bintray上传发布
19-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
17+
classpath 'com.android.tools.build:gradle:7.0.1'
2018
// kotlin
2119
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
2220
// hilt
@@ -25,27 +23,6 @@ buildscript {
2523
}
2624
}
2725

28-
allprojects {
29-
repositories {
30-
flatDir {
31-
dirs '../libs'
32-
}
33-
google()
34-
jcenter()
35-
mavenCentral()
36-
maven { url "https://jitpack.io" }
37-
}
38-
39-
tasks.withType(Javadoc) {
40-
options.addStringOption('Xdoclint:none', '-quiet') //忽略javadoc错误
41-
options {
42-
encoding "UTF-8"
43-
charSet 'UTF-8'
44-
links "http://docs.oracle.com/javase/7/docs/api"
45-
}
46-
}
47-
}
48-
4926
task clean(type: Delete) {
5027
delete rootProject.buildDir
5128
}

config.gradle

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
ext {
22

3-
versionCode = 202008171
4-
versionName = "4.5.0"
3+
versionCode = 202108301
4+
versionName = "4.6.0"
55

6-
qmui = "2.0.0-alpha11"
6+
qmui = "2.0.1"
77
okhttp = "4.9.0"
88
retrofit = "2.9.0"
99
glide = "4.12.0"
@@ -20,12 +20,9 @@ ext {
2020
]
2121

2222
googleDependencies = [
23-
"appcompat" : "androidx.appcompat:appcompat:1.3.0",
24-
"annotation" : "androidx.annotation:annotation:1.2.0",
25-
"vectordrawable-animated": "androidx.vectordrawable:vectordrawable-animated:1.1.0",
23+
"appcompat" : "androidx.appcompat:appcompat:1.3.1",
2624
"constraintlayout" : "androidx.constraintlayout:constraintlayout:2.0.4",
27-
"multidex" : "androidx.multidex:multidex:2.0.1",
28-
"material" : "com.google.android.material:material:1.2.1",
25+
"material" : "com.google.android.material:material:1.4.0",
2926
]
3027

3128
eventDependencies = [
@@ -74,11 +71,11 @@ ext {
7471
]
7572

7673
utilsDependencies = [
77-
"permissionx": "com.permissionx.guolindev:permissionx:1.4.0",
74+
"permissionx": "com.guolindev.permissionx:permissionx:1.5.0",
7875
// utils
7976
"utilcodex" : "com.blankj:utilcodex:1.30.6",
8077
// agentweb
81-
"agentweb" : "com.just.agentweb:agentweb:4.1.4",
78+
"agentweb" : "com.github.Justson.AgentWeb:agentweb-core:v4.1.9-androidx",
8279
// arouter
8380
"arouter" : "com.alibaba:arouter-api:$arouter",
8481
"gson" : "com.google.code.gson:gson:2.8.6",
@@ -87,7 +84,7 @@ ext {
8784

8885
thirdDependencies = [
8986
// 微信
90-
"wechat-sdk-mta" : "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.4",
87+
"wechat-sdk-mta" : "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.7.9",
9188
// bugly
9289
"crashreport_upgrade": "com.tencent.bugly:crashreport_upgrade:1.5.23",
9390
]

gradle/deploy.gradle

Lines changed: 33 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
apply plugin: 'maven-publish'
2-
apply plugin: 'com.jfrog.bintray'
3-
4-
def siteUrl = 'https://github.com/sdwfqin/AndroidQuick' // 项目的主页
5-
def gitUrl = 'https://github.com/sdwfqin/AndroidQuick.git' // Git仓库的url
6-
7-
group = "com.sdwfqin.quicklib"
8-
version = rootProject.ext.versionName
2+
apply plugin: 'signing'
93

104
Properties properties = new Properties()
115
File projectPropertiesFile = rootProject.file("gradle/deploy.properties")
@@ -15,6 +9,10 @@ if (projectPropertiesFile.exists()) {
159
throw new Error("Cannot find deploy.properties file in gradle folder")
1610
}
1711

12+
ext["signing.keyId"] = properties.getProperty('signing.keyId')
13+
ext["signing.password"] = properties.getProperty('signing.password')
14+
ext["signing.secretKeyRingFile"] = properties.getProperty('signing.secretKeyRingFile')
15+
1816
def isAndroidLib = project.getPlugins().hasPlugin('com.android.application') ||
1917
project.getPlugins().hasPlugin('com.android.library')
2018

@@ -46,37 +44,47 @@ if (isAndroidLib) {
4644
}
4745

4846
def pomConfig = {
47+
name "${properties.getProperty('group_id')}:${project.name}"
48+
url properties.getProperty('git_url')
4949
licenses {
5050
license {
51-
name 'The Apache Software License, Version 2.0'
52-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
51+
name properties.getProperty("license.name")
52+
url properties.getProperty("license.url")
5353
}
5454
}
5555
developers {
5656
developer {
57-
id 'sdwfqin'
58-
name 'qinzhang'
59-
57+
id properties.getProperty("developer.id")
58+
name properties.getProperty("developer.name")
59+
email properties.getProperty("developer.email")
6060
}
6161
}
6262
scm {
63-
connection gitUrl
64-
developerConnection gitUrl
65-
url siteUrl
63+
connection properties.getProperty('git_url')
64+
developerConnection properties.getProperty('git_url')
65+
url properties.getProperty('site_url')
6666
}
6767
}
6868

69+
signing {
70+
sign publishing.publications
71+
}
72+
6973
publishing {
7074
publications {
7175
mavenjava(MavenPublication) {
72-
groupId project.group
76+
groupId properties.getProperty('group_id')
77+
artifactId project.name
7378
version project.version
7479
if (isAndroidLib) {
7580
artifact file("$buildDir/outputs/aar/${project.name}-release.aar")
7681
artifact androidSourcesJar
7782
artifact androidJavadocJar
7883
pom.withXml {
7984
def root = asNode()
85+
86+
root.appendNode('description', '做外包用的快速开发库--微信、支付宝支付(含签名,下单)、自定义View(验证码/密码,九宫格图片上传等)、换肤、图片预览、RxJava、EventBus、JetPack、CameraX、base层封装等')
87+
8088
final dependenciesNode = root.appendNode('dependencies')
8189

8290
ext.addDependency = { dep, String scope ->
@@ -105,13 +113,6 @@ publishing {
105113
}
106114
}
107115

108-
// List all "compile" dependencies (for old Gradle)
109-
configurations.compile.getDependencies().each { dep -> addDependency(dep, "compile") }
110-
// List all "implementation" dependencies (for new Gradle) as "runtime" dependencies
111-
configurations.implementation.getDependencies().each { dep -> addDependency(dep, "runtime") }
112-
// List all "api" dependencies (for new Gradle) as "compile" dependencies
113-
configurations.api.getDependencies().each { dep -> addDependency(dep, "compile") }
114-
115116
root.children().last() + pomConfig
116117
}
117118
} else {
@@ -121,33 +122,20 @@ publishing {
121122

122123
pom.withXml {
123124
def root = asNode()
125+
root.appendNode('description', '做外包用的快速开发库--微信、支付宝支付(含签名,下单)、自定义View(验证码/密码,九宫格图片上传等)、换肤、图片预览、RxJava、EventBus、JetPack、CameraX、base层封装等')
124126
root.children().last() + pomConfig
125127
}
126128
}
127129

128130
}
129131
}
130-
// repositories {
131-
// maven {
132-
// url properties.getProperty("maven.url")
133-
// credentials {
134-
// username properties.getProperty("maven.username")
135-
// password properties.getProperty("maven.password")
136-
// }
137-
// }
138-
// }
139-
}
140-
141-
bintray {
142-
user = properties.getProperty("bintray.user")
143-
key = properties.getProperty("bintray.apikey")
144-
publications = ['mavenjava']
145-
pkg {
146-
repo = 'quicklib'
147-
name = project.name
148-
websiteUrl = siteUrl
149-
vcsUrl = gitUrl
150-
licenses = ["Apache-2.0"]
151-
publish = true
132+
repositories {
133+
maven {
134+
url properties.getProperty("maven.url")
135+
credentials {
136+
username properties.getProperty("maven.username")
137+
password properties.getProperty("maven.password")
138+
}
139+
}
152140
}
153141
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

imageloader/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
apply plugin: 'com.android.library'
22

3-
// ./gradlew clean build bintrayUpload
3+
version = rootProject.ext.versionName
44

55
android {
66
compileSdkVersion rootProject.ext.androidVersion.compileSdkVersion
7-
buildToolsVersion rootProject.ext.androidVersion.buildToolsVersion
7+
8+
lintOptions {
9+
abortOnError false
10+
}
811

912
defaultConfig {
1013
minSdkVersion rootProject.ext.androidVersion.minSdkVersion
1114
targetSdkVersion rootProject.ext.androidVersion.targetSdkVersion
12-
versionCode rootProject.ext.versionCode
13-
versionName rootProject.ext.versionName
1415
}
1516

1617
buildTypes {
@@ -27,7 +28,6 @@ android {
2728

2829
dependencies {
2930
implementation fileTree(include: ['*.jar'], dir: 'libs')
30-
implementation googleDependencies["annotation"]
3131
api imageDependencies["glide"]
3232
api imageDependencies["glide-integration"]
3333
api imageDependencies["androidsvg"]

paylib/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
apply plugin: 'com.android.library'
22

3-
// ./gradlew clean build bintrayUpload
3+
version = rootProject.ext.versionName
44

55
android {
66
compileSdkVersion rootProject.ext.androidVersion.compileSdkVersion
7-
buildToolsVersion rootProject.ext.androidVersion.buildToolsVersion
7+
8+
lintOptions {
9+
abortOnError false
10+
}
811

912
defaultConfig {
1013
minSdkVersion rootProject.ext.androidVersion.minSdkVersion
1114
targetSdkVersion rootProject.ext.androidVersion.targetSdkVersion
12-
versionCode rootProject.ext.versionCode
13-
versionName rootProject.ext.versionName
1415
}
1516

1617
buildTypes {

0 commit comments

Comments
 (0)