From 536b7d623775ef5bb9c1e799f3f1e277695e53e5 Mon Sep 17 00:00:00 2001 From: Daniel Hugenroth Date: Sat, 3 Apr 2021 17:28:26 +0100 Subject: [PATCH] Changed release process to MavenCentral; released version 1.3.0 --- .gitignore | 3 ++ README.md | 2 +- app/build.gradle | 2 +- build.gradle | 13 ++--- gradle.properties | 26 ++++++++++ gradle/wrapper/gradle-wrapper.properties | 2 +- lib/build.gradle | 35 +------------ lib/publish.gradle | 65 ------------------------ 8 files changed, 40 insertions(+), 108 deletions(-) delete mode 100644 lib/publish.gradle diff --git a/.gitignore b/.gitignore index 16e6fad..62ba06f 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,6 @@ fastlane/Preview.html fastlane/screenshots fastlane/test_output fastlane/readme.md + +# Custom +release_guide.md diff --git a/README.md b/README.md index f147f69..f447582 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Argon2Kt is licensed under the MIT license. See the [LICENSE file](https://githu Add the dependency to your gradle.build file: ```groovy -implementation 'com.lambdapioneer.argon2kt:argon2kt:1.2.0' +implementation 'com.lambdapioneer.argon2kt:argon2kt:1.3.0' ``` Use the `Argon2Kt` class to hash and verify using Argon2: diff --git a/app/build.gradle b/app/build.gradle index 3b30a05..22a04f6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,7 @@ android { dependencies { implementation project(":lib") - // implementation 'com.lambdapioneer.argon2kt:argon2kt:0.1' + // implementation 'com.lambdapioneer.argon2kt:argon2kt:1.3.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "androidx.appcompat:appcompat:$appcompat_version" diff --git a/build.gradle b/build.gradle index 3deef44..b083786 100644 --- a/build.gradle +++ b/build.gradle @@ -10,23 +10,24 @@ buildscript { roboelectric_version = '4.3' testrunner_version = '1.3.0' - // for bintray upload and publishing - gradle_bintray_plugin_version = '1.8.1' - android_maven_gradle_plugin_version = '2.1' + // for maven central upload and publishing + gradle_maven_publish_plugin_version = '0.14.2' + dokka_gradle_plugin_version = '1.4.30' } repositories { google() jcenter() + mavenCentral() } dependencies { classpath "com.android.tools.build:gradle:$gradle_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - // for bintray upload and publishing - classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradle_bintray_plugin_version" - classpath "com.github.dcendents:android-maven-gradle-plugin:$android_maven_gradle_plugin_version" + // for maven central upload and publishing + classpath "com.vanniktech:gradle-maven-publish-plugin:$gradle_maven_publish_plugin_version" + classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_gradle_plugin_version" } } diff --git a/gradle.properties b/gradle.properties index 2589942..cace973 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,3 +3,29 @@ org.gradle.jvmargs=-Xmx1536m android.useAndroidX=true android.enableJetifier=true kotlin.code.style=official + +# Maven release configuration +GROUP=com.lambdapioneer.argon2kt +POM_ARTIFACT_ID=argon2kt +VERSION_NAME=1.3.0 + +POM_NAME=My Library +POM_DESCRIPTION=A description of what my library does. +POM_INCEPTION_YEAR=2020 + +POM_URL=https://github.com/lambdapioneer/argon2kt +POM_SCM_URL=https://github.com/lambdapioneer/argon2kt +POM_SCM_CONNECTION=scm:git:git://github.com/lambdapioneer/argon2kt.git +POM_SCM_DEV_CONNECTION=scm:git:ssh://github.com/lambdapioneer/argon2kt.git + +POM_LICENCE_NAME=MIT License +POM_LICENCE_URL=https://github.com/lambdapioneer/argon2kt/blob/master/LICENSE +POM_LICENCE_DIST=repo + +POM_DEVELOPER_ID=lambdapioneer +POM_DEVELOPER_NAME=Daniel Hugenroth +POM_DEVELOPER_URL=https://github.com/lambdapioneer/ + +# New sonatype URLs: https://github.com/vanniktech/gradle-maven-publish-plugin/issues/206 +RELEASE_REPOSITORY_URL=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ +SNAPSHOT_REPOSITORY_URL=https://s01.oss.sonatype.org/content/repositories/snapshots/ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae2d2cd..7db62cb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip diff --git a/lib/build.gradle b/lib/build.gradle index 4069c40..23fd3d3 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -1,12 +1,8 @@ apply plugin: "com.android.library" +apply plugin: "com.vanniktech.maven.publish" apply plugin: "kotlin-android" apply plugin: "maven" -ext { - version_code = 120 - version_name = '1.2.0' -} - android { compileSdkVersion project.ext.compileSdkVersion @@ -14,9 +10,6 @@ android { minSdkVersion project.ext.minSdkVersion targetSdkVersion project.ext.targetSdkVersion - versionCode version_code - versionName version_name - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ndk { @@ -65,29 +58,3 @@ dependencies { androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version" androidTestImplementation "org.assertj:assertj-core:$jassert_version" } - -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' - -ext { - bintrayRepo = 'android_artifacts' - bintrayOrg = 'lambdapioneer' - bintrayName = 'argon2kt' - - publishedGroupId = 'com.lambdapioneer.argon2kt' - libraryName = 'argon2kt' - artifact = 'argon2kt' - - libraryDescription = 'An Android/Kotlin binding for the Argon2 hash' - - siteUrl = 'https://github.com/lambdapioneer/argon2kt' - gitUrl = 'https://github.com/lambdapioneer/argon2kt.git' - - developerId = 'lambdapioneer' - - licenseName = 'MIT License' - licenseUrl = 'https://github.com/lambdapioneer/argon2kt/blob/master/LICENSE' - allLicenses = ["MIT-License"] -} - -apply from: file('publish.gradle') diff --git a/lib/publish.gradle b/lib/publish.gradle deleted file mode 100644 index 9637575..0000000 --- a/lib/publish.gradle +++ /dev/null @@ -1,65 +0,0 @@ -group = publishedGroupId -version = version_name - -install { - repositories.mavenInstaller { - pom.project { - packaging 'aar' - groupId publishedGroupId - artifactId artifact - - name libraryName - description libraryDescription - url siteUrl - - licenses { - license { - name licenseName - url licenseUrl - } - } - developers { - developer { - id developerId - } - } - scm { - connection gitUrl - developerConnection gitUrl - url siteUrl - } - } - } -} - -task sourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs -} - -artifacts { - archives sourcesJar -} - -bintray { - user = project.hasProperty('bintrayUser') ? property('bintrayUser') : "" - key = project.hasProperty('bintrayKey') ? property('bintrayKey') : "" - - configurations = ['archives'] - pkg { - userOrg = bintrayOrg - repo = bintrayRepo - name = bintrayName - desc = libraryDescription - websiteUrl = siteUrl - vcsUrl = gitUrl - licenses = allLicenses - dryRun = project.hasProperty('dryRun') ? property('dryRun').toBoolean() : true - publish = true - override = project.hasProperty('override') ? property('override').toBoolean() : false - publicDownloadNumbers = false - version { - desc = libraryDescription - } - } -}