Skip to content

Commit fb129fe

Browse files
committedJul 10, 2021
Bump library deps and get rid of Bintray, move to Sonatype
make sure to check this file in
1 parent ea65a2a commit fb129fe

File tree

4 files changed

+52
-40
lines changed

4 files changed

+52
-40
lines changed
 

‎build.gradle

+2-15
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,13 @@
22
buildscript {
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.4.2'
8+
classpath 'com.android.tools.build:gradle:4.0.1'
99
}
1010
}
1111

12-
plugins {
13-
id "com.jfrog.bintray" version "1.8.4"
14-
}
15-
16-
plugins {
17-
id "com.github.dcendents.android-maven" version "2.1"
18-
}
19-
20-
bintray {
21-
publications = []
22-
configurations = []
23-
}
24-
2512
allprojects {
2613
repositories {
2714
google()

‎gradle.properties

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx1536m
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. More details, visit
12+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13+
# org.gradle.parallel=true
14+
# AndroidX package structure to make it clearer which packages are bundled with the
15+
# Android operating system, and which are packaged with your app's APK
16+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17+
android.useAndroidX=true
18+
# Automatically convert third-party libraries to use AndroidX
19+
android.enableJetifier=true
20+

‎gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

‎library/build.gradle

+29-24
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.github.dcendents.android-maven'
3-
apply plugin: 'com.jfrog.bintray'
2+
apply plugin: 'maven-publish'
43

5-
// https://github.com/bintray/gradle-bintray-plugin/issues/74#issuecomment-168367341
6-
// https://github.com/dcendents/android-maven-gradle-plugin/issues/9
74
ext {
85

96
GROUP = 'com.codepath.libraries'
10-
BASE_VERSION = "2.1"
11-
VERSION_NAME = "2.1.4"
7+
BASE_VERSION = "2.2"
8+
VERSION_NAME = "2.2.0"
129
POM_PACKAGING = "aar"
1310
POM_DESCRIPTION = "CodePath OAuth Handler"
1411

@@ -54,26 +51,34 @@ android {
5451
}
5552
}
5653

57-
bintray {
58-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
59-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
60-
61-
configurations = ['archives'] // needs apply plugin 'com.jfrog.bintray' to work
62-
63-
pkg {
64-
repo = 'maven'
65-
name = 'android-oauth-handler'
66-
userOrg = 'codepath'
67-
licenses = ['Apache-2.0']
68-
vcsUrl = 'https://github.com/codepath/android-oauth-handler.git'
69-
version {
70-
name = BASE_VERSION
71-
desc = POM_NAME
72-
released = new Date()
73-
vcsTag = VERSION_NAME
54+
afterEvaluate {
55+
publishing {
56+
publications {
57+
// Creates a Maven publication called "release".
58+
release(MavenPublication) {
59+
// Applies the component for the release build variant.
60+
from components.release
61+
62+
// You can then customize attributes of the publication as shown below.
63+
groupId = GROUP
64+
artifactId = POM_ARTIFACT_ID
65+
version = VERSION_NAME
66+
}
7467
}
68+
repositories {
69+
maven {
70+
name = "Sonatype"
71+
credentials {
72+
username = System.getenv('NEXUS_USERNAME')
73+
password = System.getenv('NEXUS_PASSWORD')
74+
}
75+
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
76+
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
77+
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
78+
setUrl(url)
79+
}
7580
}
76-
81+
}
7782
}
7883

7984
task sourcesJar(type: Jar) {

0 commit comments

Comments
 (0)
Please sign in to comment.