Skip to content

Commit

Permalink
Merge pull request #90 from navasmdc/develop
Browse files Browse the repository at this point in the history
Add the gradle dependency information
  • Loading branch information
navasmdc committed Jan 10, 2015
2 parents b86dfad + c8c0b64 commit d712493
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 8 deletions.
78 changes: 78 additions & 0 deletions MaterialDesign/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

android {
compileSdkVersion 19
Expand Down Expand Up @@ -28,8 +30,84 @@ android {
}
}

ext.siteUrl = 'https://github.com/navasmdc/MaterialDesignLibrary'
ext.issueUrl = 'https://github.com/navasmdc/MaterialDesignLibrary/issues'
ext.gitUrl = 'https://github.com/navasmdc/MaterialDesignLibrary.git'

bintray {
user = hasProperty('BINTRAY_USER') ? BINTRAY_USER : "_"
key = hasProperty('BINTRAY_KEY') ? BINTRAY_PASSWORD : "_"

configurations = ["archives"]
pkg {
repo = 'maven'
name = 'MaterialDesignLibrary'
desc = 'This is a library with components of Android L to you use in android 2.2'
websiteUrl = siteUrl
issueTrackerUrl = issueUrl
vcsUrl = gitUrl
licenses = ['Apache-2.0']
labels = []
publicDownloadNumbers = true
}
}

dependencies {
compile 'com.nineoldandroids:library:2.4.+'
compile 'com.android.support:support-v4:21.+'
}

install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'MaterialDesignLibrary'
url siteUrl
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'navasmdc'
name 'Iván Navas'
email 'i.navas.mdc@gmail.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

task findConventions << {
println project.getConvention()
}

14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@

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.

If you prefer it, you can use the grade dependency, you have to add these lines in your buil.gradle file:

```xml
repositories {
jcenter()
}

dependencies {
compile(group: 'com.github.navasmdc', name: 'MaterialDesign', version: '1.0', ext: 'aar')
}
```

Some components have custom attributes, if you want use them, you must add this line in your xml file in the first component:

```xml
Expand Down Expand Up @@ -195,7 +207,7 @@ Some components have custom attributes, if you want use them, you must add this
```xml
<com.gc.materialdesign.views.ProgressBarDetermininate
<com.gc.materialdesign.views.ProgressBarDeterminate
android:id="@+id/progressDeterminate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
Expand Down
8 changes: 3 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:1.+'
classpath 'org.codehaus.groovy:groovy-backports-compat23:2.3.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
}
}

Expand All @@ -16,11 +18,7 @@ allprojects {
mavenCentral()
}

group = "com.gc.materialdesign"
group = "com.github.navasmdc"
version = "1.0"
}

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

3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@

VERSION_NAME=1.0
VERSION_CODE=1
GROUP=com.gc.materialdesign

GROUP=com.github.navasmdc.MaterialDesignLibrary
GROUP=com.github.navasmdc

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

0 comments on commit d712493

Please sign in to comment.