Skip to content

Commit

Permalink
updated publish scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Sep 7, 2018
1 parent d28ee85 commit 0023c27
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 86 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation project(":rssparser")
//implementation 'com.prof.rssparser:rssparser:1.4.1'
// implementation project(":rssparser")
implementation 'com.prof.rssparser:rssparser:1.4.4'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath "com.github.dcendents:android-maven-gradle-plugin:1.5"
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
55 changes: 2 additions & 53 deletions rssparser/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'


android {
compileSdkVersion 27
Expand All @@ -25,55 +24,5 @@ dependencies {
}


group = 'com.prof.rssparser'
version = '1.4.1'

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

afterEvaluate {
javadoc.classpath += files(android.libraryVariants.collect { variant ->
variant.javaCompiler.classpath.files
})
}

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

task generateJavadocsJar(type: Jar) {
from javadoc.destinationDir
classifier 'javadoc'
}

generateJavadocsJar.dependsOn javadoc

bintray {
user = 'prof18'
key = 'API_KEY'
pkg {
repo = 'maven'
name = 'RSS-Parser'
apply from: 'publish.gradle'

version {
name = '1.4.1'
desc = 'A library to parse RSS feed'
released = new Date()
vcsTag = '1.4.1'
}

licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/prof18/RSS-Parser.git'
websiteUrl = 'https://github.com/prof18/RSS-Parser'
}
configurations = ['archives']

}

artifacts {
archives generateJavadocsJar
archives generateSourcesJar
}
58 changes: 58 additions & 0 deletions rssparser/publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

version '1.4.4'
group 'com.prof.rssparser'

publishing {
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/rssparser-release.aar") {
builtBy tasks.getByName("assembleRelease")
}
groupId
artifactId 'rssparser'
version this.version

pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')

// Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
// Ensure dependencies such as fileTree are not included in the pom.
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}

def properties = new Properties()
properties.load(new FileInputStream("local.properties"))

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications = ['Production']
configurations = ['archives']
override = true
pkg {
repo = 'maven'
name = 'RSS-Parser'
description = "An Android library to parse RSS Feed"
publicDownloadNumbers = true
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/prof18/RSS-Parser.git'
version {
name = this.version
desc = "Example ${this.version}"
released = new Date()
vcsTag = this.version
}
}
}

This file was deleted.

15 changes: 0 additions & 15 deletions rssparser/src/test/java/com/prof/rssparser/ExampleUnitTest.java

This file was deleted.

0 comments on commit 0023c27

Please sign in to comment.