diff --git a/.idea/modules.xml b/.idea/modules.xml index 6daa9fac..af7c0ceb 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,7 +3,7 @@ - + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 2b20069e..de6ed52d 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/build.gradle b/build.gradle index 81dfbab1..e283a8ac 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/library/build.gradle b/library/build.gradle index c73b26cc..282813e6 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -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 @@ -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 'wallsamuelj@gmail.com' + } + } + 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 + } +} diff --git a/sample/build.gradle b/sample/build.gradle index f6e07dfa..4b4a4b28 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -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') } diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index a11ca104..90e480a9 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -16,7 +16,7 @@ --> + package="uk.co.samuelwall.materialtaptargetprompt.sample">