|
1 | 1 | apply plugin: 'com.android.library'
|
2 |
| -apply plugin: 'com.github.dcendents.android-maven' |
3 |
| -apply plugin: 'com.jfrog.bintray' |
4 |
| - |
5 |
| -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 |
| -} |
76 | 2 |
|
77 | 3 | android {
|
78 | 4 | compileSdkVersion 25
|
|
0 commit comments