[go: nahoru, domu]

Skip to content

Commit

Permalink
add signing to publish artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
maxme committed Feb 4, 2015
1 parent fc65662 commit 4edc93f
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 22 deletions.
19 changes: 0 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +0,0 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0-rc4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}
79 changes: 76 additions & 3 deletions editor/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'

repositories {
mavenCentral()
}

android {
publishNonDefault true

compileSdkVersion 21
buildToolsVersion "21.1.2"
buildToolsVersion "21.1.1"

defaultConfig {
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
minSdkVersion 9
targetSdkVersion 21
}
buildTypes {
release {
Expand All @@ -21,3 +38,59 @@ android {
dependencies {
compile 'com.android.support:appcompat-v7:21.0.3'
}

signing {
required {
project.properties.containsKey("signing.keyId") && project.properties.containsKey("signing.secretKeyRingFile")
}
sign configurations.archives
}

version android.defaultConfig.versionName
group = "org.wordpress"
archivesBaseName = "editor"

// http://central.sonatype.org/pages/gradle.html

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: project.properties.ossrhUsername, password: project.properties.ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: project.properties.ossrhUsername, password: project.properties.ossrhPassword)
}

pom.project {
name 'WordPress-Android-Editor'
packaging 'aar'
description 'A reusable Android rich text editor component'
url 'https://github.com/wordpress-mobile/WordPress-Android-Editor'
scm {
connection 'scm:git:https://github.com/wordpress-mobile/WordPress-Android-Editor.git'
developerConnection 'scm:git:https://github.com/wordpress-mobile/WordPress-Android-Editor.git'
url 'https://github.com/wordpress-mobile/WordPress-Android-Editor'
}

licenses {
license {
name 'The MIT License (MIT)'
url 'http://opensource.org/licenses/MIT'
}
}

developers {
developer {
id 'maxme'
name 'Maxime Biais'
email 'maxime@automattic.com'
}
}
}
}
}
}

0 comments on commit 4edc93f

Please sign in to comment.