This repository has been archived by the owner on Mar 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bbfa16
commit b21c06d
Showing
7 changed files
with
133 additions
and
6 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
VERSION_NAME=0.0.1-SNAPSHOT | ||
VERSION_CODE=1 | ||
|
||
GROUP_ID=net.frakbot.android.location | ||
POM_ARTIFACT_ID=location-hub | ||
POM_NAME=net.frakbot.android.location | ||
|
||
POM_PACKAGING=aar | ||
POM_DESCRIPTION=Unified API for managing Android Location services. | ||
POM_URL=https://github.com/frakbot/AndroidLocationHub | ||
|
||
POM_SCM_URL=https://github.com/frakbot/AndroidLocationHub | ||
POM_SCM_CONNECTION=scm:[email protected]:frakbot/AndroidLocationHub.git | ||
POM_SCM_DEV_CONNECTION=scm:[email protected]:frakbot/AndroidLocationHub.git | ||
|
||
POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENCE_DIST=repo | ||
|
||
POM_DEVELOPER_1_ID=frapontillo | ||
POM_DEVELOPER_1_NAME=Francesco Pontillo | ||
POM_DEVELOPER_1_EMAIL[email protected] | ||
|
||
POM_DEVELOPER_2_ID=rock3r | ||
POM_DEVELOPER_2_NAME=Sebastiano Poggi | ||
POM_DEVELOPER_2_EMAIL[email protected] |
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
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
def sonatypeRepositoryUrl | ||
|
||
def isReleaseBuild() { | ||
return VERSION_NAME.contains("SNAPSHOT") == false | ||
} | ||
|
||
if (isReleaseBuild()) { | ||
println 'RELEASE BUILD' | ||
sonatypeRepositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} else { | ||
println 'DEBUG BUILD' | ||
sonatypeRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
|
||
afterEvaluate { project -> | ||
|
||
configurations { | ||
archives { | ||
extendsFrom configurations.default | ||
} | ||
} | ||
|
||
signing { | ||
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath) | ||
|
||
/*repository(url: sonatypeRepositoryUrl) { | ||
authentication(userName: nexusUsername, password: nexusPassword) | ||
}*/ | ||
|
||
pom.project { | ||
name POM_NAME | ||
description POM_DESCRIPTION | ||
artifactId = POM_ARTIFACT_ID | ||
groupId GROUP_ID | ||
version VERSION_NAME | ||
|
||
packaging POM_PACKAGING | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
developers { | ||
for(i in 1..2) { | ||
developer { | ||
id getProperty('POM_DEVELOPER_'+ i + '_ID') | ||
name getProperty('POM_DEVELOPER_'+ i + '_NAME') | ||
email getProperty('POM_DEVELOPER_'+ i + '_EMAIL') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task androidJavadocs(type: Javadoc) { | ||
source = android.sourceSets.main.allJava | ||
} | ||
|
||
task androidJavadocsJar(type: Jar) { | ||
classifier = 'javadoc' | ||
//basename = artifact_id | ||
from androidJavadocs.destinationDir | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
//basename = artifact_id | ||
from android.sourceSets.main.allSource | ||
} | ||
|
||
artifacts { | ||
//archives packageReleaseJar | ||
archives androidSourcesJar | ||
archives androidJavadocsJar | ||
} | ||
} |
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