Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 2 additions & 64 deletions WebServiceManager/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion 27
Expand All @@ -10,7 +8,7 @@ android {
minSdkVersion 8
targetSdkVersion 27
versionCode 1
versionName "1.0"
versionName "1.0.3"
}
buildTypes {
release {
Expand All @@ -27,64 +25,4 @@ dependencies {
implementation 'com.raizlabs:CoreUtils:1.1.7'
}

//Generate POM files needed to publish the artifacts to JCenter public Repo
install {
repositories.mavenInstaller.pom.project {
packaging 'aar'
groupId GROUP_NAME
artifactId ARTIFACT_NAME

// Set your license
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

scm {
connection GIT_URL
developerConnection GIT_URL
url SITE_URL
}
}
}

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

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

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

artifacts {
archives androidSourcesJar
archives androidJavadocsJar
}

//Bintray Upload
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray_user")
key = properties.getProperty("bintray_key")

configurations = ['archives']

pkg {
repo = 'Libraries'
name = ARTIFACT_NAME
userOrg = 'raizlabs'
publish = true
version.name = VERSION_NAME
}
}
apply from: 'publish.gradle'
58 changes: 58 additions & 0 deletions WebServiceManager/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 VERSION_NAME
group GROUP_NAME

publishing {
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/WebServiceManager-release.aar")
groupId GROUP_NAME
artifactId ARTIFACT_NAME
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.
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.hasProperty('bintrayUser') ? properties.getProperty('bintrayUser') : System.getenv('BINTRAY_USER')
key = properties.hasProperty('bintrayApiKey') ? properties.getProperty('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['Production']
configurations = ['archives']
override = true
pkg {
repo = REPO
name = ARTIFACT_NAME
userOrg = USER_ORG
publish = true
description = DESCRIPTION
publicDownloadNumbers = true
licenses = ['The Apache Software License, Version 2.0', 'http://www.apache.org/licenses/LICENSE-2.0.txt']
vcsUrl = GIT_URL
dryRun = true
version {
name = this.version
desc = "WebServiceManager ${this.version}"
released = new Date()
vcsTag = this.version
}
}
}
8 changes: 1 addition & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ VERSION_NAME=1.0.3
ARTIFACT_NAME = WebServiceManager
GROUP_NAME = com.raizlabs
GIT_URL = https://github.com/Raizlabs/AndroidWebServiceManager.git
SITE_URL = https://github.com/Raizlabs/AndroidWebServiceManager
SITE_URL = https://github.com/Raizlabs/AndroidWebServiceManager
DESCRIPTION = An efficient http client wrapper library that handles all the multi-threaded web requests and responses asynchronously.
REPO = Libraries
USER_ORG = raizlabs