Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makes the mail module working in android #20

Open
wants to merge 20 commits into
base: spongy-master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Gradle: Upload signed Spongy Castle artifacts to Sonatype OSS Nexus
http://yennicktrevels.com/blog/2013/10/11/automated-gradle-project-deployment-to-sonatype-oss-repository/

Using a 'spongycastle' subgroup (ie com.madgag.spongycastle) to give a useful
grouping, apparently this is legit:

https://docs.sonatype.org/display/Repository/Choosing+your+Coordinates

Also guard against missing gradle.properties for travis, which doesn't have
to do signing or uploading to sonatype.
  • Loading branch information
rtyley committed Dec 29, 2015
commit 4cf9de8e422df9312ff61b86be6f5e2ec4aca279
85 changes: 81 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,89 @@ ext {
bcTestDataHome = file('core/src/test/data').absolutePath
}

task printProperties << {
println bcTestDataHome
}

subprojects {
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'

group = 'com.madgag.spongycastle'

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}

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

artifacts {
archives jar

archives javadocJar
archives sourcesJar
}

if (project.hasProperty("signing.keyId")) {
signing {
sign configurations.archives
}
}

if (project.hasProperty("sonatypeUsername")) {
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}

pom.project {
name 'Spongy Castle'
packaging 'jar'
description 'Spongy Castle is a package-rename (org.bouncycastle.* to org.spongycastle.*) of Bouncy Castle\n' +
'intended for the Android platform. Android unfortunately ships with a stripped-down version of\n' +
'Bouncy Castle, which prevents easy upgrades - Spongy Castle overcomes this and provides a full,\n' +
'up-to-date version of the Bouncy Castle cryptographic libs.'
url 'http://rtyley.github.io/spongycastle/'

scm {
url 'scm:git@github.com:rtyley/spongycastle.git'
connection 'scm:git@github.com:rtyley/spongycastle.git'
developerConnection 'scm:git@github.com:rtyley/spongycastle.git'
}

licenses {
license {
name 'Bouncy Castle Licence'
url 'http://www.bouncycastle.org/licence.html'
distribution 'repo'
}
}

developers {
developer {
id 'rtyley'
name 'Roberto Tyley'
}
}
}
}
}
}
}

repositories {
mavenCentral()
}

dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}

sourceCompatibility = 1.5
targetCompatibility = 1.5
Expand Down