Skip to content

Commit 8c753f2

Browse files
committed
v1
1 parent 95da62c commit 8c753f2

24 files changed

+205
-167
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ library/src/main/res/drawable/
6161
samples/libs/
6262
samples/src/main/res/drawable/
6363
.idea/misc.xml
64+
/repo/

.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

build.gradle

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@ buildscript {
44
repositories {
55
jcenter()
66
google()
7-
maven{
8-
url uri('./repo')
9-
}
107
}
118
dependencies {
12-
classpath 'com.android.tools.build:gradle:2.3.3'
13-
classpath 'com.novoda:bintray-release:0.8.1'
14-
classpath 'org.greenleaf.utils:injectplugin:1.0.0'
9+
classpath 'com.android.tools.build:gradle:4.2.2'
1510
}
1611
}
1712

@@ -30,6 +25,7 @@ ext {
3025
userOrg = 'davy'
3126
repoName = "maven"
3227
groupId = 'org.greenleaf.utils'
28+
version = '1.0.0'
3329
desc = 'useful tool for android'
3430
website = 'https://github.com/davyjoneswang/AndroidCommonUtils'
3531
licences = ['Apache-2.0']
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Thu Jun 07 22:54:29 CST 2018
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

injectplugin/build.gradle

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
11
apply plugin: 'groovy'
2-
apply plugin: 'com.novoda.bintray-release'
3-
apply plugin: 'maven'
4-
5-
publish {
6-
artifactId = 'injectplugin'
7-
uploadName = 'AndroidInjectPlugin'
8-
publishVersion = '1.0.1'
9-
10-
userOrg = rootProject.ext.userOrg
11-
repoName = rootProject.ext.repoName
12-
groupId = rootProject.ext.groupId
13-
desc = rootProject.ext.desc
14-
website = rootProject.ext.website
15-
licences = rootProject.ext.licences
16-
bintrayUser = BINTRAY_USER
17-
bintrayKey = BINTRAY_KEY
18-
}
2+
apply plugin: 'maven-publish'
193

204
dependencies {
215
compile gradleApi()//gradle sdk
226
compile localGroovy()
23-
compile 'com.android.tools.build:gradle:2.3.3'
7+
compile 'com.android.tools.build:gradle:3.2.0'
248
compile 'org.apache.commons:commons-io:1.3.2'
259
compile 'org.javassist:javassist:3.20.0-GA'
2610
}
2711

12+
task generateSourcesJar(type: Jar) {
13+
from sourceSets.main.java.srcDirs
14+
classifier 'sources'
15+
}
2816

29-
//设置maven deployer
30-
uploadArchives {
31-
repositories {
32-
mavenDeployer {
33-
pom.artifactId = 'injectplugin'
34-
pom.groupId = 'org.greenleaf.utils'
35-
pom.version = '1.0.0'
36-
//文件发布到下面目录
37-
repository(url: uri('../repo'))
17+
//发布maven库
18+
publishing {
19+
//配置maven-publishing插件的输出物
20+
publications {
21+
maven(MavenPublication) {
22+
from components.java
23+
//发布仓库的文件路径
24+
groupId = rootProject.ext.groupId
25+
//库名
26+
artifactId = 'injectplugin'
27+
//版本号
28+
version = rootProject.ext.version
29+
//指定打包路径
30+
// artifact "$buildDir/outputs/aar/${project.name}-release.aar"
31+
// 上传source,这样使用方可以看到方法注释
32+
artifact generateSourcesJar
3833
}
3934
}
4035
}

0 commit comments

Comments
 (0)