1
1
apply plugin : ' com.android.library'
2
+ apply plugin : " maven-publish"
3
+ apply plugin : ' com.jfrog.bintray'
4
+ apply plugin : ' com.github.dcendents.android-maven'
5
+ apply plugin : ' maven'
6
+
7
+ version = " 1.0"
8
+ group = ' com.github.bloder'
2
9
3
10
android {
4
11
compileSdkVersion 23
@@ -18,6 +25,81 @@ android {
18
25
}
19
26
}
20
27
28
+ install {
29
+ repositories. mavenInstaller {
30
+ pom {
31
+ project {
32
+ packaging ' aar'
33
+
34
+ name ' MagicButton'
35
+ description = ' Android field validation lib'
36
+ url ' https://github.com/daniel-martins-IR/MagicButton'
37
+
38
+ licenses {
39
+ license {
40
+ name ' The Apache Software License, Version 2.0'
41
+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
42
+ }
43
+ }
44
+ developers {
45
+ developer {
46
+ id ' bloder'
47
+ name ' Bloder'
48
+
49
+ }
50
+ }
51
+ scm {
52
+ connection ' https://github.com/daniel-martins-IR/MagicButton.git'
53
+ developerConnection ' https://github.com/daniel-martins-IR/MagicButton.git'
54
+ url ' https://github.com/daniel-martins-IR/MagicButton'
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ task sourcesJar (type : Jar ) {
62
+ from android. sourceSets. main. java. srcDirs
63
+ classifier = ' sources'
64
+ }
65
+
66
+ task javadoc (type : Javadoc ) {
67
+ source = android. sourceSets. main. java. srcDirs
68
+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
69
+ }
70
+
71
+ task javadocJar (type : Jar , dependsOn : javadoc) {
72
+ classifier = ' javadoc'
73
+ from javadoc. destinationDir
74
+ }
75
+ artifacts {
76
+ archives javadocJar
77
+ archives sourcesJar
78
+ }
79
+
80
+ Properties properties = new Properties ()
81
+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
82
+
83
+ bintray {
84
+ user = System . getenv(' BINTRAY_USER' )
85
+ key = System . getenv(' BINTRAY_KEY' )
86
+ configurations = [' archives' ]
87
+ pkg {
88
+ repo = ' maven'
89
+ name = ' MagicButton'
90
+ licenses = [' Apache-2.0' ]
91
+ websiteUrl = ' https://github.com/daniel-martins-IR/MagicButton'
92
+ vcsUrl = ' https://github.com/daniel-martins-IR/MagicButton.git'
93
+ publish = true
94
+ version {
95
+ gpg {
96
+ sign = true
97
+ passphrase = properties. getProperty(" bintray.gpg.password" )
98
+ }
99
+ }
100
+ }
101
+ }
102
+
21
103
dependencies {
22
104
compile fileTree(dir : ' libs' , include : [' *.jar' ])
23
105
testCompile ' junit:junit:4.12'
0 commit comments