Skip to content

Commit

Permalink
New bintray upload setup re #134
Browse files Browse the repository at this point in the history
  • Loading branch information
yarolegovich committed Aug 1, 2020
1 parent a96b065 commit 863f185
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 7 deletions.
8 changes: 1 addition & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
}
}

Expand All @@ -22,13 +23,6 @@ task clean(type: Delete) {
}

ext {
userOrg = 'yarolegovich'
groupId = 'com.yarolegovich'
uploadName = 'DiscreteScrollView'
desc = 'A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.'
publishVersion = '1.4.9'
licences = ['Apache-2.0']

compileSdkVersion = 29
buildToolsVersion = '29.0.2'
targetSdkVersion = 29
Expand Down
1 change: 1 addition & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
apply from: rootProject.file('release-bintray.gradle')

android {
compileSdkVersion rootProject.compileSdkVersion
Expand Down
60 changes: 60 additions & 0 deletions release-bintray.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

def upload = [
user : 'yarolegovich',
artifactId : 'discrete-scrollview',
userOrg : 'yarolegovich',
repository : 'maven',
groupId : 'com.yarolegovich',
uploadName : 'DiscreteScrollView',
description: 'A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.',
version : '1.5.0',
licences : ['Apache-2.0']
]

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

version upload.version

afterEvaluate {

publishing {
publications {
LibRelease(MavenPublication) {
from components.release

artifact androidSourcesJar

artifactId upload.artifactId
groupId upload.groupId
version upload.version
}
}
}

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

bintray {
user = upload.user
key = localProps.getProperty('bintray.api_key')
publications = ['LibRelease']
configurations = ['archives']
pkg {
name = upload.uploadName
repo = upload.repository
userOrg = upload.userOrg
licenses = upload.licences
publish = true
dryRun = false
version {
name = upload.version
desc = upload.description
}
}
}
}

0 comments on commit 863f185

Please sign in to comment.