Skip to content

Commit

Permalink
Added bittray publish to Gradle build script
Browse files Browse the repository at this point in the history
  • Loading branch information
sjwall committed Jun 5, 2016
1 parent 788bf42 commit edb7be7
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ A Tap Target implementation in Android based on Material Design Onboarding guide

![Example](http://i.imgur.com/Ei7iAcn.png?1)

# Gradle
To use the gradle dependency, add this to build.gradle:
```groovy
repositories {
jcenter()
}
dependencies {
compile 'uk.co.samuelwall:material-tap-target-prompt:1.0.0'
}
```

# Usage
Basic usage is shown below with more examples in the sample app:

Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
84 changes: 84 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
*/

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

// Maven Group ID for the artifact
group = 'uk.co.samuelwall'
version = "1.0.0"

android {
compileSdkVersion 23
Expand All @@ -39,3 +45,81 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-annotations:23.4.0'
}

install {
repositories.mavenInstaller {
pom {
//noinspection GroovyAssignabilityCheck
project {
packaging 'aar'
name 'material-tap-target-prompt'
url 'https://github.com/sjwall/MaterialTapTargetPrompt'

groupId 'uk.co.samuelwall'
artifactId 'material-tap-target-prompt'

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'sjwall'
name 'Samuel Wall'
email '[email protected]'
}
}
scm {
connection 'https://github.com/sjwall/MaterialTapTargetPrompt.git'
developerConnection 'https://github.com/sjwall/MaterialTapTargetPrompt.git'
url 'https://github.com/sjwall/MaterialTapTargetPrompt'

}
}
}
}
}

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
}

// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']

publish = false
pkg {
repo = 'maven'
name = 'material-tap-target-prompt'
desc = 'Material Design tap target for Android'
websiteUrl = 'https://github.com/sjwall/MaterialTapTargetPrompt'
vcsUrl = 'https://github.com/sjwall/MaterialTapTargetPrompt.git'
licenses = ["Apache-2.0"]
publicDownloadNumbers = false
}
}
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ dependencies {
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile project(':library')
compile project(':material-tap-target-prompt')
}
2 changes: 1 addition & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.co.samuelwall.sample">
package="uk.co.samuelwall.materialtaptargetprompt.sample">

<application
android:allowBackup="true"
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
*/

include ':library', ':sample'

project(':library').name = 'material-tap-target-prompt'

0 comments on commit edb7be7

Please sign in to comment.