Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #381 from rey5137/dev
Browse files Browse the repository at this point in the history
Release 1.2.4
  • Loading branch information
rey5137 committed Jun 3, 2016
2 parents f8e9cd7 + 41f7bd9 commit da7fc68
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 87 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
}
}

if(hasProperty('MATERIAL_KEYSTORE_FILE')) {
if(project.hasProperty('MATERIAL_KEYSTORE_FILE')) {
android.signingConfigs {
release {
storeFile file(MATERIAL_KEYSTORE_FILE)
Expand Down
55 changes: 28 additions & 27 deletions dist/bintray.gradle
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply from: "$rootProject.projectDir/dist/distInfo.gradle"

group = publishedGroupId // Maven Group ID for the artifact
def distInfo = ext.distInfo;

group = distInfo.publishedGroupId // Maven Group ID for the artifact

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact
packaging distInfo.libraryPackaging
groupId distInfo.publishedGroupId
artifactId distInfo.artifact

// Add your description here
name libraryName
description libraryDescription
url siteUrl
name distInfo.libraryName
description distInfo.libraryDescription
url distInfo.siteUrl

// Set your license
licenses {
license {
name licenseName
url licenseUrl
name distInfo.licenseName
url distInfo.licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
id distInfo.developerId
name distInfo.developerName
email distInfo.developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
connection distInfo.gitUrl
developerConnection distInfo.gitUrl
url distInfo.siteUrl

}
}
}
}
}

version = libraryVersion
version = distInfo.libraryVersion

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
Expand All @@ -66,24 +67,24 @@ artifacts {
}

bintray {
user = bintrayUser
key = bintrayApiKey
user = distInfo.bintrayUser
key = distInfo.bintrayApiKey

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
repo = distInfo.bintrayRepo
name = distInfo.bintrayName
desc = distInfo.libraryDescription
websiteUrl = distInfo.siteUrl
vcsUrl = distInfo.gitUrl
licenses = distInfo.allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
desc = distInfo.libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = bintrayGpgPassword
passphrase = distInfo.bintrayGpgPassword
//Optional. The passphrase for GPG signing'
}
}
Expand Down
67 changes: 33 additions & 34 deletions dist/distInfo.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
ext {
bintrayUser = project.hasProperty('BINTRAY_USERNAME') ? BINTRAY_USERNAME : ""
bintrayApiKey = project.hasProperty('BINTRAY_APIKEY') ? BINTRAY_APIKEY : ""
bintrayGpgPassword = project.hasProperty('GPG_PASSWORD') ? GPG_PASSWORD : ""

mavenUser = project.hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
mavenPassword = project.hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
mavenReleaseRepo = project.hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
mavenSnapshotRepo = project.hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL : "https://oss.sonatype.org/content/repositories/snapshots/"

bintrayRepo = 'maven'
bintrayName = 'material'

publishedGroupId = 'com.github.rey5137'
libraryName = 'Material Library'
artifact = 'material'
libraryPackaging = 'aar'

libraryDescription = 'An Android library to bring Material Design UI to pre-Lolipop Android.'

siteUrl = 'https://github.com/rey5137/material'
gitUrl = 'https://github.com/rey5137/material.git'

libraryVersion = '1.2.3'

developerId = 'rey5137'
developerName = 'Rey Pham'
developerEmail = 'pea5137@gmail.com'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
licenseDist = 'repo'
allLicenses = ["Apache-2.0"]
}
ext.distInfo = [
bintrayUser : project.hasProperty('BINTRAY_USERNAME') ? BINTRAY_USERNAME : "",
bintrayApiKey : project.hasProperty('BINTRAY_APIKEY') ? BINTRAY_APIKEY : "",
bintrayGpgPassword : project.hasProperty('GPG_PASSWORD') ? GPG_PASSWORD : "",

mavenUser : project.hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "",
mavenPassword : project.hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "",
mavenReleaseRepo : project.hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL : "https://oss.sonatype.org/service/local/staging/deploy/maven2/",
mavenSnapshotRepo : project.hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL : "https://oss.sonatype.org/content/repositories/snapshots/",

bintrayRepo : "maven",
bintrayName : "material",

publishedGroupId : "com.github.rey5137",
libraryName : "Material Library",
libraryVersion : "1.2.4",
libraryDescription : "An Android library to bring Material Design UI to pre-Lolipop Android.",
artifact : "material",
libraryPackaging : "aar",

siteUrl : "https://github.com/rey5137/material",
gitUrl : "https://github.com/rey5137/material.git",


developerId : "rey5137",
developerName : "Rey Pham",
developerEmail : "pea5137@gmail.com",

licenseName : "The Apache Software License, Version 2.0",
licenseUrl : "http://www.apache.org/licenses/LICENSE-2.0.txt",
licenseDist : "repo",
allLicenses : ["Apache-2.0"]
]
43 changes: 22 additions & 21 deletions dist/maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

apply plugin: 'maven'
apply plugin: 'signing'
apply from: "$rootProject.projectDir/dist/distInfo.gradle"

def distInfo = ext.distInfo;

def isReleaseBuild() {
return libraryVersion.contains("SNAPSHOT") == false
return distInfo.libraryVersion.contains("SNAPSHOT") == false
}

afterEvaluate { project ->
Expand All @@ -28,41 +29,41 @@ afterEvaluate { project ->
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

pom.groupId = publishedGroupId
pom.artifactId = artifact
pom.version = libraryVersion
pom.groupId = distInfo.publishedGroupId
pom.artifactId = distInfo.artifact
pom.version = distInfo.libraryVersion

repository(url: mavenReleaseRepo) {
authentication(userName: mavenUser, password: mavenPassword)
repository(url: distInfo.mavenReleaseRepo) {
authentication(userName: distInfo.mavenUser, password: distInfo.mavenPassword)
}
snapshotRepository(url: mavenSnapshotRepo) {
authentication(userName: mavenUser, password: mavenPassword)
snapshotRepository(url: distInfo.mavenSnapshotRepo) {
authentication(userName: distInfo.mavenUser, password: distInfo.mavenPassword)
}

pom.project {
name libraryName
packaging libraryPackaging
description libraryDescription
url siteUrl
name distInfo.libraryName
packaging distInfo.libraryPackaging
description distInfo.libraryDescription
url distInfo.siteUrl

scm {
url siteUrl
connection gitUrl
developerConnection gitUrl
url distInfo.siteUrl
connection distInfo.gitUrl
developerConnection distInfo.gitUrl
}

licenses {
license {
name licenseName
url licenseUrl
distribution licenseDist
name distInfo.licenseName
url distInfo.licenseUrl
distribution distInfo.licenseDist
}
}

developers {
developer {
id developerId
name developerName
id distInfo.developerId
name distInfo.developerName
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions material/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 9
targetSdkVersion 23
versionCode 21
versionName "1.2.3"
versionName "1.2.4"
}
buildTypes {
release {
Expand All @@ -18,9 +18,6 @@ android {
}
}

apply from: "$rootProject.projectDir/dist/bintray.gradle"
apply from: "$rootProject.projectDir/dist/maven.gradle"

ext{
libSupportVersion = '23.4.0'
}
Expand All @@ -32,3 +29,8 @@ dependencies {
compile "com.android.support:cardview-v7:${libSupportVersion}"
compile "com.android.support:recyclerview-v7:${libSupportVersion}"
}

// Place it at the end of the file
apply from: "$rootProject.projectDir/dist/distInfo.gradle"
apply from: "$rootProject.projectDir/dist/bintray.gradle"
apply from: "$rootProject.projectDir/dist/maven.gradle"

0 comments on commit da7fc68

Please sign in to comment.