From 5a6dc400aabccd1dcb0522f3dd07b226a4e78819 Mon Sep 17 00:00:00 2001 From: rahul <609380+rahul27@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:38:45 -0700 Subject: [PATCH] Release 1.0.0 (#18) * Release 1.0.0 * set 1.0.0 --- README.md | 2 +- build.gradle.kts | 29 +++++++++++++++++++++++++++++ buildSrc/src/main/java/AppConfig.kt | 2 +- buildSrc/src/main/java/Versions.kt | 13 +++++++------ 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 196caaa..6595fcd 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ maven { ## Version History -The latest release of the SDK is `0.6.0`. Details about the current and past releases can be found in the [Releases](https://github.com/moonsense/moonsense-android-sdk/releases) section. +The latest release of the SDK is `1.0.0`. Details about the current and past releases can be found in the [Releases](https://github.com/moonsense/moonsense-android-sdk/releases) section. ## Integration diff --git a/build.gradle.kts b/build.gradle.kts index 3a33415..91d5d1d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask + // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { @@ -13,6 +15,10 @@ buildscript { } } +plugins { + id("com.github.ben-manes.versions").version(Versions.gradleVersionsPlugin) +} + allprojects { repositories { google() @@ -26,4 +32,27 @@ allprojects { tasks.register("clean", Delete::class) { delete(rootProject.buildDir) +} + +fun isNonStable(version: String): Boolean { + val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) } + val regex = "^[0-9,.v-]+(-r)?$".toRegex() + val isStable = stableKeyword || regex.matches(version) + return isStable.not() +} + +tasks.withType { + outputFormatter = closureOf { + if (outdated.dependencies.isEmpty()) { + println("Up to date!") + } else { + for (dependency in outdated.dependencies) { + println("${dependency.group} ${dependency.name} ${dependency.version} -> ${dependency.available.release ?: dependency.available.milestone}") + } + } + } + rejectVersionIf { + // ignore jacoco - https://github.com/ben-manes/gradle-versions-plugin/issues/534 + isNonStable(candidate.version) || (candidate.group == "org.jacoco") && (candidate.version != currentVersion) + } } \ No newline at end of file diff --git a/buildSrc/src/main/java/AppConfig.kt b/buildSrc/src/main/java/AppConfig.kt index 6981866..866197e 100644 --- a/buildSrc/src/main/java/AppConfig.kt +++ b/buildSrc/src/main/java/AppConfig.kt @@ -8,7 +8,7 @@ object AppConfig { const val minSdkVersion = 16 const val targetSdkVersion = 31 const val versionCode = 1 - const val versionName = "0.6.0" + const val versionName = "1.0.0" const val buildToolsVersion = "30.0.3" const val androidTestInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" const val jvmTarget = "11" diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index e1e3e5e..34f5a1f 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -5,16 +5,17 @@ object Versions { const val gradleTools = "7.2.1" - const val kotlinVersion = "1.6.21" + const val kotlinVersion = "1.7.0" const val junit = "4.13.2" const val junitAndroidX = "1.1.3" const val espressoCore = "3.4.0" - const val squareWireRuntime = "4.3.0" - const val constraintLayout = "2.1.3" - const val fragmentKtx = "1.4.1" + const val squareWireRuntime = "4.4.0" + const val constraintLayout = "2.1.4" + const val fragmentKtx = "1.5.0" const val androidXLegacySupport = "1.0.0" - const val material = "1.5.0" + const val material = "1.6.1" const val retrofit = "2.9.0" const val gson = "2.9.0" - const val mockWebServer = "4.9.3" + const val mockWebServer = "4.10.0" + const val gradleVersionsPlugin = "0.42.0" } \ No newline at end of file