-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
5 changed files
with
79 additions
and
18 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,8 +1,7 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
/.idea/ | ||
.DS_Store | ||
/build | ||
/captures | ||
|
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,71 @@ | ||
apply plugin: 'maven-publish' | ||
|
||
version = VERSION_NAME | ||
group = GROUP | ||
|
||
def isReleaseBuild() { | ||
return VERSION_NAME.contains("SNAPSHOT") == false | ||
} | ||
|
||
def getReleaseRepositoryUrl() { | ||
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | ||
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} | ||
|
||
def getSnapshotRepositoryUrl() { | ||
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL | ||
: "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" | ||
} | ||
task sourceJar(type: Jar) { | ||
from sourceSets.main.allJava | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
|
||
from components.java | ||
pom.withXml { | ||
def node = asNode() | ||
|
||
node.children().last() + { | ||
resolveStrategy = Closure.DELEGATE_FIRST | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
name project.getName() | ||
licenses { | ||
license { | ||
name 'Apache License Version 2.0' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
} | ||
artifact sourceJar { | ||
classifier "sources" | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url isReleaseBuild() ? getReleaseRepositoryUrl() : getSnapshotRepositoryUrl() | ||
credentials { | ||
username = getRepositoryUsername() | ||
password = getRepositoryPassword() | ||
} | ||
} | ||
} | ||
} |
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,6 @@ | ||
VERSION_NAME=0.1.1 | ||
GROUP=net.yrom | ||
POM_PACKAGING=jar | ||
POM_DESCRIPTION=Inline constant fields of android R class by asm and transform-api | ||
POM_DEVELOPER_ID=net.yrom | ||
POM_DEVELOPER_NAME=yrom |