Skip to content

Commit

Permalink
Migration from JCenter to mavenCentral (#21)
Browse files Browse the repository at this point in the history
Migration from JCenter to maven central - first pass.
  • Loading branch information
efguydan authored Jun 24, 2021
1 parent ae4d460 commit ef19e33
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 67 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ build/

# Signing files
.signing/
*/gpg-keys/
*.gpg

# Local configuration file (sdk path, etc)
local.properties
Expand Down
50 changes: 0 additions & 50 deletions bintrayconfig.gradle

This file was deleted.

8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ buildscript {

repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:' + versions.gradlePlugin
classpath "com.diffplug.spotless:spotless-plugin-gradle:" + versions.spotlessPlugin
classpath 'com.novoda:bintray-release:' + versions.bintrayRelease
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:' + versions.kotlin
classpath 'com.vanniktech:gradle-maven-publish-plugin:' + versions.mavenPublishPlugin
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}

tasks.withType(Javadoc).all {
Expand All @@ -29,4 +29,4 @@ allprojects {

task clean(type: Delete) {
delete rootProject.buildDir
}
}
14 changes: 8 additions & 6 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
ext.versions = [
minSdk : 19,
compileSdk : 29,
buildTools : '29.0.0',
publishVersion : '0.0.7',
compileSdk : 30,
buildTools : '30.0.2',
publishGroupID : 'com.cottacush',
publishArtifactID : 'CurrencyEditText',
publishVersion : '0.0.8',
publishVersionCode: 1,

gradlePlugin : '3.4.1',
spotlessPlugin : '3.23.1',
gradlePlugin : '4.2.1',
spotlessPlugin : '4.0.0',
versionsPlugin : '0.21.0',
bintrayRelease : '0.9.1',
mavenPublishPlugin: '0.15.1',

kotlin : '1.3.40',
ktx : '1.0.2',
Expand Down
20 changes: 20 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,23 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

# Maven Deployment Variables
GROUP=com.cottacush
VERSION_NAME=0.0.8

POM_ARTIFACT_ID=CurrencyEditText
POM_NAME=CurrencyEditText
POM_DESCRIPTION=A library to dynamically format your EditTexts to take currency inputs.

POM_URL=https://github.com/CottaCush/CurrencyEditText
POM_SCM_URL=https://github.com/CottaCush/CurrencyEditText
POM_SCM_CONNECTION=scm:git:github.com/cottacush/currencyedittext.git
POM_SCM_DEV_CONNECTION=scm:git:github.com/cottacush/currencyedittext.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=https://github.com/CottaCush/CurrencyEditText/blob/master/LICENSE.md
POM_LICENCE_DIST=repo

systemProp.org.gradle.internal.publish.checksums.insecure=true
systemProp.org.gradle.internal.http.socketTimeout=120000
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip
11 changes: 5 additions & 6 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.vanniktech.maven.publish'
apply from: '../dependencies.gradle'

apply from: '../bintrayconfig.gradle'
apply from: '../signing.gradle'

android {
compileSdkVersion versions.compileSdk
Expand All @@ -12,9 +12,9 @@ android {
sourceCompatibility 1.8
targetCompatibility 1.8

if (modulePackageId != null && modulePackageId != '') {
logger.warn('Package for current module: ' + modulePackageId)
kotlinOptions.freeCompilerArgs += ['-module-name', modulePackageId]
if (modulePackageID != null && modulePackageID != '') {
logger.warn('Package for current module: ' + modulePackageID)
kotlinOptions.freeCompilerArgs += ['-module-name', modulePackageID]
} else {
logger.warn('Skipping setting compiler module name, no package to use.')
}
Expand All @@ -33,7 +33,6 @@ android {
'src/main/res-public'
]
}

}

dependencies {
Expand Down
25 changes: 25 additions & 0 deletions signing.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
allprojects {
plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
}
}

ext["signing.keyId"] = ''
ext["signing.password"] = ''
ext["signing.secretKeyRingFile"] = ''

File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
Properties properties = new Properties()
new FileInputStream(secretPropsFile).withCloseable { is -> properties.load(is) }
properties.each { name, value -> ext[name] = value }
} else {
// Use system environment variables
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID')
ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE')
}

ext.modulePackageID = versions.publishGroupID + '.' + versions.publishArtifactID

0 comments on commit ef19e33

Please sign in to comment.