Skip to content

Commit fb98b5b

Browse files
committed
初始提交
1 parent 68714ba commit fb98b5b

File tree

1 file changed

+71
-3
lines changed

1 file changed

+71
-3
lines changed

loglib/build.gradle

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,77 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'com.jfrog.bintray'
44

5-
def siteUrl = 'https://github.com/' // 项目的主页 这个是说明,可随便填
6-
def gitUrl = 'https://github.com/' // Git仓库的url 这个是说明,可随便填
7-
group = "com.yhw.loglib"
85
version = "1.0.0"
6+
def siteUrl = 'https://github.com/LuckyCodeer/AndroidLogLib' // 项目的主页
7+
def gitUrl = 'https://github.com/LuckyCodeer/AndroidLogLib.git' // Git仓库的url
8+
group = "com.yhw.loglib" // Maven Group ID for the artifact
9+
10+
install {
11+
repositories.mavenInstaller {
12+
// This generates POM.xml with proper parameters
13+
pom {
14+
project {
15+
packaging 'aar'
16+
// Add your description here
17+
name 'An android log print library'
18+
//项目的描述 你可以多写一点
19+
url siteUrl
20+
// Set your license
21+
licenses {
22+
license {
23+
name 'The Apache Software License, Version 2.0'
24+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
25+
}
26+
}
27+
developers {
28+
developer {
29+
id 'yanghongwei' //填写的一些基本信息
30+
name 'yanghongwei'
31+
email 'yhwvip@vip.qq.com'
32+
}
33+
}
34+
scm {
35+
connection gitUrl
36+
developerConnection gitUrl
37+
url siteUrl
38+
}
39+
}
40+
}
41+
}
42+
}
43+
task sourcesJar(type: Jar){
44+
from android.sourceSets.main.java.srcDirs
45+
classifier = 'sources'
46+
}
47+
//task javadoc(type: Javadoc){
48+
//options.encoding = 'UTF-8'
49+
//source = android.sourceSets.main.java.srcDirs
50+
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
51+
//}
52+
//task javadocJar(type: Jar, dependsOn: javadoc) {
53+
// classifier = 'javadoc'
54+
// from javadoc.destinationDir
55+
//}
56+
artifacts {
57+
// archives javadocJar
58+
archives sourcesJar
59+
}
60+
Properties properties = new Properties()//读取properties的配置信息,当然直接把信息写到代码里也是可以的
61+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
62+
bintray {
63+
user = properties.getProperty("bintray.user")
64+
key = properties.getProperty("bintray.apikey")
65+
configurations = ['archives']
66+
pkg {
67+
userOrg = "yanghongwei"
68+
repo = "AndroidLogLib" //这个应该是传到maven的仓库的
69+
name = "AndroidLogLib" //发布的项目名字
70+
websiteUrl = siteUrl
71+
vcsUrl = gitUrl
72+
licenses = ["Apache-2.0"]
73+
publish = true
74+
}
75+
}
976

1077
android {
1178
compileSdkVersion 25
@@ -34,5 +101,6 @@ dependencies {
34101
exclude group: 'com.android.support', module: 'support-annotations'
35102
})
36103
compile 'com.android.support:appcompat-v7:25.3.1'
104+
compile 'com.loopj.android:android-async-http:1.4.9'
37105
testCompile 'junit:junit:4.12'
38106
}

0 commit comments

Comments
 (0)