Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMarquis committed Oct 11, 2015
1 parent 18ec3fc commit 9c8dc00
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 8 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ What's gonna happen?
**<a href="intent://example.com:8042/over/there/index.html?query=something#refresh#Intent;scheme=test;package=fr.smarquis.usi.sample;action=android.intent.action.VIEW;S.string=abc;B.boolean=true;i.int=123;l.long=123456;f.float=123.456;end">Click here</a> to trigger the url scheme!**

## Integration
Import the [aar file](https://github.com/SimonMarquis/Android-UrlSchemeInterceptor/releases) into your project as a new module called `usi`:
`File``New``New Module``Import .JAR/.AAR package`

Then in your `build.gradle` file:
In your `build.gradle` file:

```groovy
dependencies {
compile project(':usi')
compile 'fr.smarquis.usi:usi:1.0.0'
}
```

Expand Down Expand Up @@ -65,6 +62,3 @@ intent://example.com:8042/over/there/index.html?query=something#refresh#Intent;s
```

The `package=x.y.z;` is mandatory to prompt the user to install the app if it is not already on the device.

## TODO
- [ ] Publish aar to jCenter and Maven
79 changes: 79 additions & 0 deletions usi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ def libVersionPatch = 0
def libVersionSnapshot = false
def libVersionName = "${libVersionMajor}.${libVersionMinor}.${libVersionPatch}${libVersionSnapshot ? '-SNAPSHOT' : ''}"

def libGroupId = 'fr.smarquis.usi'
def libArtifactId = 'usi'
def libLocalRepository = "${buildDir}/maven/${libVersionName}"
def libLocalArtifact = "${buildDir}/artifact/"

android {
resourcePrefix 'usi_'

Expand Down Expand Up @@ -53,3 +58,77 @@ android.libraryVariants.all { variant ->
dependencies {
compile 'com.android.support:support-annotations:23.0.1'
}

apply plugin: 'maven'

task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
classpath += files(ext.androidJar)
}

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

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

uploadArchives {
repositories.mavenDeployer {
pom.groupId = libGroupId
pom.artifactId = libArtifactId
pom.version = libVersionName
repository(url: "file://${libLocalRepository}")

pom.project {
name 'Android-UrlSchemeInterceptor'
description 'Intercept and debug url scheme on Android'
packaging 'aar'
url 'https://simonmarquis.github.io/Android-UrlSchemeInterceptor/'

scm {
url 'https://github.com/SimonMarquis/Android-UrlSchemeInterceptor'
connection 'scm:git@github.com:SimonMarquis/Android-UrlSchemeInterceptor.git'
developerConnection 'scm:git@github.com:SimonMarquis/Android-UrlSchemeInterceptor.git'
}

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

developers {
developer {
id 'SimonMarquis'
name 'Simon Marquis'
}
}
}
}
}

task zipRelease(type: Zip) {
from libLocalRepository
destinationDir file(libLocalArtifact)
archiveName "${libArtifactId}-${libVersionName}.zip"
}

task generateRelease << {
println "Release ${libVersionName} can be found at ${libLocalRepository}/"
println "Release ${libVersionName} zipped can be found ${libLocalArtifact}/${libArtifactId}-${libVersionName}.zip"
}

generateRelease.dependsOn(uploadArchives)
generateRelease.dependsOn(zipRelease)

artifacts {
archives androidSourcesJar
archives androidJavadocsJar
}

0 comments on commit 9c8dc00

Please sign in to comment.