-
Notifications
You must be signed in to change notification settings - Fork 86
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
11 changed files
with
154 additions
and
74 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,10 +1,10 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:2.2.3' | ||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' | ||
classpath 'com.android.tools.build:gradle:3.1.0-rc03' | ||
} | ||
} | ||
|
||
|
@@ -15,16 +15,30 @@ ext { | |
nexusUsername = getEnvOrProperty('NEXUS_USERNAME') | ||
nexusPassword = getEnvOrProperty('NEXUS_PASSWORD') | ||
|
||
compileSdkVersion = 25 | ||
buildToolsVersion = '25.0.0' | ||
targetSdkVersion = 25 | ||
developers = [ | ||
[ | ||
id : 'laenger', | ||
name : 'Christian Langer', | ||
email: '[email protected]' | ||
] | ||
] | ||
scm = [ | ||
connection : 'scm:git:[email protected]:laenger/ViewPagerBottomSheet.git', | ||
developerConnection: 'scm:git:[email protected]:laenger/ViewPagerBottomSheet.git', | ||
url : 'https://github.com/laenger/ViewPagerBottomSheet' | ||
] | ||
|
||
supportVersion = '25.1.0' | ||
butterknifeVersion = '8.4.0' | ||
compileSdkVersion = 27 | ||
buildToolsVersion = '27.0.3' | ||
targetSdkVersion = 27 | ||
|
||
supportVersion = '27.1.0' | ||
butterknifeVersion = '8.8.1' | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
jcenter() | ||
maven { url "https://raw.github.com/laenger/maven-releases/master/releases" } | ||
maven { url "https://raw.github.com/laenger/maven-releases/master/snapshots" } | ||
|
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
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
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 was deleted.
Oops, something went wrong.
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,73 @@ | ||
apply plugin: 'maven-publish' | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name "nexus" | ||
credentials { | ||
username nexusUsername | ||
password nexusPassword | ||
} | ||
url project.android.defaultConfig.versionName.endsWith('-SNAPSHOT') ? nexusSnapshotsRepository : nexusReleasesRepository | ||
} | ||
} | ||
|
||
publications { | ||
android.libraryVariants.each { variant -> | ||
if (variant.buildType.name == "release") { | ||
"${variant.name}"(MavenPublication) { | ||
groupId project.group | ||
artifactId project.archivesBaseName | ||
version project.android.defaultConfig.versionName | ||
|
||
artifact tasks["bundle${variant.name.capitalize()}"] | ||
artifact tasks["generate${variant.name.capitalize()}SourcesJar"] | ||
|
||
pom.withXml { | ||
def rootNode = asNode() | ||
|
||
rootNode.appendNode('name', project.title) | ||
rootNode.appendNode('description', project.description) | ||
rootNode.appendNode('url', project.scm.url) | ||
|
||
def developersNode = rootNode.appendNode('developers') | ||
project.developers.each { | ||
def developerNode = developersNode.appendNode('developer') | ||
it.each { name, value -> developerNode.appendNode(name, value) } | ||
} | ||
|
||
def scmNode = rootNode.appendNode('scm') | ||
project.scm.each { name, value -> scmNode.appendNode(name, value) } | ||
|
||
def dependenciesNode = rootNode.appendNode('dependencies') | ||
variant.compileConfiguration.allDependencies.each { | ||
def dependencyNode = dependenciesNode.appendNode('dependency') | ||
dependencyNode.appendNode('groupId', it.group) | ||
dependencyNode.appendNode('artifactId', it.name) | ||
dependencyNode.appendNode('version', it.version) | ||
|
||
if (!it.excludeRules.empty) { | ||
def exclusionsNode = dependencyNode.appendNode('exclusions') | ||
it.excludeRules.each { rule -> | ||
def exclusionNode = exclusionsNode.appendNode('exclusion') | ||
exclusionNode.appendNode('groupId', rule.group) | ||
exclusionNode.appendNode('artifactId', rule.module) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
android.libraryVariants.all { variant -> | ||
if (variant.buildType.name == 'release') { | ||
model { | ||
tasks."generatePomFileFor${variant.name.capitalize()}Publication" { | ||
destination = new File(destination.parent, "${buildLibraryArchiveBaseName(variant)}-pom.xml") | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.