Skip to content

Commit

Permalink
Updated version to 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwernick committed Nov 18, 2018
1 parent c0f4bc3 commit dea8b6c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repositories {
}
dependencies {
implementation 'com.devbrackets.android:exomedia:4.2.3'
implementation 'com.devbrackets.android:exomedia:4.3.0'
}
```

Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ apply plugin: 'com.android.library'
*/
class LibraryInfo {
static Integer versionMajor = 4
static Integer versionMinor = 2
static Integer versionPatch = 3
static Integer versionMinor = 3
static Integer versionPatch = 0

static String artifactId = 'exomedia'
static String groupId = 'com.devbrackets.android'
Expand Down
45 changes: 32 additions & 13 deletions library/gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ task androidJavaDocJar(type: Jar, dependsOn: androidJavaDoc) {

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
from android.sourceSets.main.java.srcDirs
}

/**
* Bintray Deploy
* `$ ./gradlew clean build bintrayUpload`
* `$ ./gradlew clean library:assembleRelease androidJavaDocJar androidSourcesJar generatePomFileForJcenterPublication bintrayUpload`
*/
publishing {
publications {
Expand All @@ -37,22 +37,41 @@ publishing {
version project.getLibraryInfo().versionName

artifact bundleReleaseAar
artifact androidSourcesJar
artifact androidJavaDocJar
artifact androidSourcesJar

// The generated POM doesn't include dependencies when building Android artifacts, so we manually
// add the dependencies to the POM here
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
def rootNode = asNode().appendNode('dependencies')

// Iterate over the implementation dependencies, adding a <dependency> node for each
configurations.implementation.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
/**
* Helper method to add dependencies to the POM node
*/
ext.addDependency = { Node dependenciesNode, Dependency dependency, String dependencyScope->
// We don't add incomplete dependencies
if (dependency.name == null ||
dependency.name == 'unspecified' ||
dependency.group == null ||
dependency.version == null) {
return
}

def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
dependencyNode.appendNode('scope', dependencyScope)
}

// Iterate over the implementation dependencies, adding a <dependency> node for each
configurations.implementation.dependencies.each {
addDependency(rootNode, it, "runtime")
}

// Iterate over the api dependencies, adding a <dependency> node for each
configurations.api.dependencies.each {
addDependency(rootNode, it, "compile")
}
}
}
Expand All @@ -66,10 +85,10 @@ publishing {
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['jcenter']
setPublications('jcenter')

pkg {
userOrg = ''
userOrg = 'brianwernick'
repo = 'maven'
name = 'ExoMedia'
licenses = ['Apache-2.0']
Expand Down

0 comments on commit dea8b6c

Please sign in to comment.