-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apparently things can't be put in the root build.gradle
- Loading branch information
Emil Sjolander
committed
Feb 20, 2015
1 parent
9e07e04
commit 76aaef2
Showing
3 changed files
with
115 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
android { | ||
compileSdkVersion 21 | ||
|
@@ -14,9 +16,58 @@ android { | |
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
provided 'com.google.code.gson:gson:2.3.1' | ||
configurations { | ||
archives { | ||
extendsFrom configurations.default | ||
} | ||
} | ||
|
||
version = "1.2.0" | ||
group = "com.flipboard.goldengate" | ||
|
||
if (canUploadArchives()) { | ||
uploadArchives { | ||
configuration = configurations.archives | ||
repositories.mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: sonatypeRepo) { | ||
authentication(userName: sonatypeUsername, password: sonatypePassword) | ||
} | ||
|
||
pom.project { | ||
name 'GoldenGate' | ||
packaging 'jar' | ||
description 'Generate type safe java bridge into webview javascript code' | ||
url 'https://github.com/flipboard/GoldenGate' | ||
|
||
scm { | ||
url 'https://github.com/Flipboard/GoldenGate.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'BSD 3-Clause License' | ||
url 'https://github.com/Flipboard/GoldenGate/blob/master/LICENSE' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'emilsjolander' | ||
name 'Emil Sjölander' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { has("release") && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
afterEvaluate { project -> | ||
|
@@ -35,15 +86,13 @@ afterEvaluate { project -> | |
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
android.libraryVariants.all { variant -> | ||
def name = variant.name.capitalize() | ||
task "jar${name}"(type: Jar) { | ||
from variant.javaCompile.destinationDir | ||
} | ||
} | ||
|
||
artifacts { | ||
archives androidJavadocJar | ||
archives androidSourcesJar | ||
} | ||
} | ||
|
||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
provided 'com.google.code.gson:gson:2.3.1' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,63 +15,6 @@ allprojects { | |
} | ||
} | ||
|
||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
version = "1.2.0" | ||
group = "com.flipboard.goldengate" | ||
|
||
def canUploadArchives() { | ||
return project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword') && project.hasProperty('sonatypeRepo') | ||
} | ||
|
||
configurations { | ||
archives { | ||
extendsFrom configurations.default | ||
} | ||
} | ||
|
||
if (canUploadArchives()) { | ||
uploadArchives { | ||
configuration = configurations.archives | ||
repositories.mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: sonatypeRepo) { | ||
authentication(userName: sonatypeUsername, password: sonatypePassword) | ||
} | ||
|
||
pom.project { | ||
name 'GoldenGate' | ||
packaging 'jar' | ||
description 'Generate type safe java bridge into webview javascript code' | ||
url 'https://github.com/flipboard/GoldenGate' | ||
|
||
scm { | ||
url 'https://github.com/Flipboard/GoldenGate.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'BSD 3-Clause License' | ||
url 'https://github.com/Flipboard/GoldenGate/blob/master/LICENSE' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'emilsjolander' | ||
name 'Emil Sjölander' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { has("release") && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
sourceCompatibility = 1.7 | ||
|
||
|
@@ -10,6 +12,60 @@ sourceSets { | |
} | ||
} | ||
|
||
configurations { | ||
archives { | ||
extendsFrom configurations.default | ||
} | ||
} | ||
|
||
version = "1.2.0" | ||
group = "com.flipboard.goldengate" | ||
|
||
if (canUploadArchives()) { | ||
uploadArchives { | ||
configuration = configurations.archives | ||
repositories.mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: sonatypeRepo) { | ||
authentication(userName: sonatypeUsername, password: sonatypePassword) | ||
} | ||
|
||
pom.project { | ||
name 'GoldenGate' | ||
packaging 'jar' | ||
description 'Generate type safe java bridge into webview javascript code' | ||
url 'https://github.com/flipboard/GoldenGate' | ||
|
||
scm { | ||
url 'https://github.com/Flipboard/GoldenGate.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'BSD 3-Clause License' | ||
url 'https://github.com/Flipboard/GoldenGate/blob/master/LICENSE' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'emilsjolander' | ||
name 'Emil Sjölander' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { has("release") && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
|