Skip to content

Commit d712493

Browse files
committed
Merge pull request navasmdc#90 from navasmdc/develop
Add the gradle dependency information
2 parents b86dfad + c8c0b64 commit d712493

File tree

4 files changed

+95
-8
lines changed

4 files changed

+95
-8
lines changed

MaterialDesign/build.gradle

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: 'com.jfrog.bintray'
24

35
android {
46
compileSdkVersion 19
@@ -28,8 +30,84 @@ android {
2830
}
2931
}
3032

33+
ext.siteUrl = 'https://github.com/navasmdc/MaterialDesignLibrary'
34+
ext.issueUrl = 'https://github.com/navasmdc/MaterialDesignLibrary/issues'
35+
ext.gitUrl = 'https://github.com/navasmdc/MaterialDesignLibrary.git'
36+
37+
bintray {
38+
user = hasProperty('BINTRAY_USER') ? BINTRAY_USER : "_"
39+
key = hasProperty('BINTRAY_KEY') ? BINTRAY_PASSWORD : "_"
40+
41+
configurations = ["archives"]
42+
pkg {
43+
repo = 'maven'
44+
name = 'MaterialDesignLibrary'
45+
desc = 'This is a library with components of Android L to you use in android 2.2'
46+
websiteUrl = siteUrl
47+
issueTrackerUrl = issueUrl
48+
vcsUrl = gitUrl
49+
licenses = ['Apache-2.0']
50+
labels = []
51+
publicDownloadNumbers = true
52+
}
53+
}
54+
3155
dependencies {
3256
compile 'com.nineoldandroids:library:2.4.+'
3357
compile 'com.android.support:support-v4:21.+'
3458
}
3559

60+
install {
61+
repositories.mavenInstaller {
62+
pom {
63+
project {
64+
packaging 'aar'
65+
name 'MaterialDesignLibrary'
66+
url siteUrl
67+
licenses {
68+
license {
69+
name 'The Apache Software License, Version 2.0'
70+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
71+
}
72+
}
73+
developers {
74+
developer {
75+
id 'navasmdc'
76+
name 'Iván Navas'
77+
78+
}
79+
}
80+
scm {
81+
connection gitUrl
82+
developerConnection gitUrl
83+
url siteUrl
84+
}
85+
}
86+
}
87+
}
88+
}
89+
90+
task sourcesJar(type: Jar) {
91+
from android.sourceSets.main.java.srcDirs
92+
classifier = 'sources'
93+
}
94+
95+
task javadoc(type: Javadoc) {
96+
source = android.sourceSets.main.java.srcDirs
97+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
98+
}
99+
100+
task javadocJar(type: Jar, dependsOn: javadoc) {
101+
classifier = 'javadoc'
102+
from javadoc.destinationDir
103+
}
104+
105+
artifacts {
106+
archives javadocJar
107+
archives sourcesJar
108+
}
109+
110+
task findConventions << {
111+
println project.getConvention()
112+
}
113+

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@
3030

3131
If you want use this library, you only have to download MaterialDesign project, import it into your workspace and add the project as a library in your android project settings.
3232

33+
If you prefer it, you can use the grade dependency, you have to add these lines in your buil.gradle file:
34+
35+
```xml
36+
repositories {
37+
jcenter()
38+
}
39+
40+
dependencies {
41+
compile(group: 'com.github.navasmdc', name: 'MaterialDesign', version: '1.0', ext: 'aar')
42+
}
43+
```
44+
3345
Some components have custom attributes, if you want use them, you must add this line in your xml file in the first component:
3446

3547
```xml
@@ -195,7 +207,7 @@ Some components have custom attributes, if you want use them, you must add this
195207
196208
197209
```xml
198-
<com.gc.materialdesign.views.ProgressBarDetermininate
210+
<com.gc.materialdesign.views.ProgressBarDeterminate
199211
android:id="@+id/progressDeterminate"
200212
android:layout_width="fill_parent"
201213
android:layout_height="wrap_content"

build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ buildscript {
77
dependencies {
88
classpath 'com.android.tools.build:gradle:1.+'
99
classpath 'org.codehaus.groovy:groovy-backports-compat23:2.3.5'
10+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
11+
classpath 'com.github.dcendents:android-maven-plugin:1.2'
1012
}
1113
}
1214

@@ -16,11 +18,7 @@ allprojects {
1618
mavenCentral()
1719
}
1820

19-
group = "com.gc.materialdesign"
21+
group = "com.github.navasmdc"
2022
version = "1.0"
2123
}
2224

23-
subprojects {
24-
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
25-
}
26-

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919

2020
VERSION_NAME=1.0
2121
VERSION_CODE=1
22-
GROUP=com.gc.materialdesign
2322

24-
GROUP=com.github.navasmdc.MaterialDesignLibrary
23+
GROUP=com.github.navasmdc
2524

2625
POM_DESCRIPTION=This is a library with components of Android L to you use in android 2.2
2726
POM_URL=https://github.com/navasmdc/MaterialDesignLibrary

0 commit comments

Comments
 (0)