Skip to content

Commit

Permalink
fix #568: implemented maven central release support and dropped bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
gotev committed Apr 17, 2021
1 parent 7744d8a commit 40ff286
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 101 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="uploadservice-logo.png">
</p>

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android%20Upload%20Service-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2161) [![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/) [ ![Download](https://api.bintray.com/packages/gotev/maven/android-upload-service/images/download.svg) ](https://bintray.com/gotev/maven/android-upload-service/_latestVersion) [ ![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.gotev/uploadservice/badge.svg) ](https://search.maven.org/search?q=g:net.gotev) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android%20Upload%20Service-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2161) [![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/) [ ![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.gotev/uploadservice/badge.svg) ](https://search.maven.org/search?q=g:net.gotev) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

| :information_source: :new: | [Get started with 4.x](https://github.com/gotev/android-upload-service/wiki/Getting-Started-with-4.x) |
|--|--|
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ buildscript {
classpath "com.android.tools.build:gradle:$gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.github.ben-manes:gradle-versions-plugin:$gradle_versions_plugin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintray_plugin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:$kotlin_lint_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
1 change: 0 additions & 1 deletion examples/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ buildscript {

//classpath dependencies to import library project
classpath "com.github.ben-manes:gradle-versions-plugin:$gradle_versions_plugin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintray_plugin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 0 additions & 4 deletions manifest.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ ext {

maintainer = 'Aleksandar Gotev'

bintray_project_name = 'android-upload-service'
library_description = 'Easily upload files in the background with automatic Android Notification Center progress indication.'
library_keywords = ['android', 'upload', 'service', 'library', 'background', 'notification']
library_licenses = ["Apache-2.0"]
library_licenses_url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
library_project_group = 'net.gotev'
Expand All @@ -22,7 +19,6 @@ ext {
kotlin_version = '1.4.10'
gradle_version = '4.1.2'
gradle_versions_plugin_version = '0.28.0'
bintray_plugin_version = '1.8.4'
kotlin_lint_version = '9.0.0'

// Library and app testing dependencies versions
Expand Down
10 changes: 9 additions & 1 deletion release
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash -e
./gradlew clean test publish bintrayUpload
echo "Releasing on Maven Central ..."
./gradlew clean test publish -PmavSigning=true -PmavPublishToRemoteRepo=true --max-workers 1

echo "Generating Demo Apk ..."
version=$(cat manifest.gradle | grep "library_version" | tr "'" '\n' | head -n 2 | tail -n 1)
./generate-debug-apk

echo "Creating GitHub Release ..."
hub release create -a uploadservice-demo-debug.apk -m "$version" "$version"

echo
echo "Done!"
echo "Visit https://oss.sonatype.org/#stagingRepositories and confirm the release"
36 changes: 3 additions & 33 deletions uploadservice-ftp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: "org.jlleitschuh.gradle.ktlint"

Properties properties = new Properties()
if (project.rootProject.file("local.properties").exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}

// start - module specific overrides of default values written in manifest.gradle
def bintray_project_name = "android-upload-service-ftp"
def library_description = "FTP Upload implementation for Android Upload Service."
def library_keywords = ['android', 'upload', 'service', 'ftp', 'upload']
// end - module specific overrides

// start - do not modify this if your project is on github
project.ext {
mavDevelopers = [(properties.getProperty("bintray.user")): (maintainer)]
mavDevelopers = [(github_username): (maintainer)]
mavSiteUrl = "https://github.com/${github_username}/${github_repository_name}"
mavGitUrl = mavSiteUrl + '.git'
bugTrackerUrl = mavSiteUrl + '/issues/'
mavProjectName = bintray_project_name
mavProjectName = "android-upload-service-ftp"
mavLibraryLicenses = ["Apache-2.0": 'http://www.apache.org/licenses/LICENSE-2.0.txt']
mavLibraryDescription = library_description
mavLibraryDescription = "FTP Upload implementation for Android Upload Service."
mavVersion = library_version
}
// end - do not modify this if your project is on github
Expand Down Expand Up @@ -91,22 +79,4 @@ dependencies {
api project(':uploadservice')
}

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications = ['mavenPublish']
pkg {
repo = "maven"
name = mavProjectName
desc = library_description
websiteUrl = mavSiteUrl
vcsUrl = mavGitUrl
issueTrackerUrl = bugTrackerUrl
licenses = library_licenses
labels = library_keywords
publicDownloadNumbers = true
publish = true
}
}

apply from: 'https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/gradle-mavenizer.gradle'
36 changes: 3 additions & 33 deletions uploadservice-okhttp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: "org.jlleitschuh.gradle.ktlint"

Properties properties = new Properties()
if (project.rootProject.file("local.properties").exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}

// start - module specific overrides of default values written in manifest.gradle
def bintray_project_name = "android-upload-service-okhttp"
def library_description = "OkHttp stack implementation for Android Upload Service."
def library_keywords = ['android', 'upload', 'service', 'okhttp', 'stack']
// end - module specific overrides

// start - do not modify this if your project is on github
project.ext {
mavDevelopers = [(properties.getProperty("bintray.user")): (maintainer)]
mavDevelopers = [(github_username): (maintainer)]
mavSiteUrl = "https://github.com/${github_username}/${github_repository_name}"
mavGitUrl = mavSiteUrl + '.git'
bugTrackerUrl = mavSiteUrl + '/issues/'
mavProjectName = bintray_project_name
mavProjectName = "android-upload-service-okhttp"
mavLibraryLicenses = ["Apache-2.0": 'http://www.apache.org/licenses/LICENSE-2.0.txt']
mavLibraryDescription = library_description
mavLibraryDescription = "OkHttp stack implementation for Android Upload Service."
mavVersion = library_version
}
// end - do not modify this if your project is on github
Expand Down Expand Up @@ -86,22 +74,4 @@ dependencies {
api project(':uploadservice')
}

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications = ['mavenPublish']
pkg {
repo = "maven"
name = mavProjectName
desc = library_description
websiteUrl = mavSiteUrl
vcsUrl = mavGitUrl
issueTrackerUrl = bugTrackerUrl
licenses = library_licenses
labels = library_keywords
publicDownloadNumbers = true
publish = true
}
}

apply from: 'https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/gradle-mavenizer.gradle'
30 changes: 3 additions & 27 deletions uploadservice/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: 'kotlin-kapt'

Properties properties = new Properties()
if (project.rootProject.file("local.properties").exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}

// start - do not modify this if your project is on github
project.ext {
mavDevelopers = [(properties.getProperty("bintray.user")): (maintainer)]
mavDevelopers = [(github_username): (maintainer)]
mavSiteUrl = "https://github.com/${github_username}/${github_repository_name}"
mavGitUrl = mavSiteUrl + '.git'
bugTrackerUrl = mavSiteUrl + '/issues/'
mavProjectName = bintray_project_name
mavProjectName = "android-upload-service"
mavLibraryLicenses = ["Apache-2.0": 'http://www.apache.org/licenses/LICENSE-2.0.txt']
mavLibraryDescription = library_description
mavLibraryDescription = "Easily upload files in the background with automatic Android Notification Center progress indication."
mavVersion = library_version
}
// end - do not modify this if your project is on github
Expand Down Expand Up @@ -94,22 +88,4 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications = ['mavenPublish']
pkg {
repo = "maven"
name = mavProjectName
desc = library_description
websiteUrl = mavSiteUrl
vcsUrl = mavGitUrl
issueTrackerUrl = bugTrackerUrl
licenses = library_licenses
labels = library_keywords
publicDownloadNumbers = true
publish = true
}
}

apply from: 'https://raw.githubusercontent.com/sky-uk/gradle-maven-plugin/master/gradle-mavenizer.gradle'

0 comments on commit 40ff286

Please sign in to comment.