Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6554abc

Browse files
committed
Config bintray in magic button gradle
1 parent f8d1720 commit 6554abc

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

magic/build.gradle

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
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'
29

310
android {
411
compileSdkVersion 23
@@ -18,6 +25,81 @@ android {
1825
}
1926
}
2027

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+
21103
dependencies {
22104
compile fileTree(dir: 'libs', include: ['*.jar'])
23105
testCompile 'junit:junit:4.12'

0 commit comments

Comments
 (0)