From 9fd52ff0493e29c8948a1e114a611fb445e415a1 Mon Sep 17 00:00:00 2001 From: Vladislav Frolov Date: Wed, 22 Oct 2025 11:13:43 +0200 Subject: [PATCH 1/5] update README.md --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 30b2807..00eee74 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # updraft-plugin 🚀 +[![Maven Central](https://maven-badges.sml.io/sonatype-central/com.appswithlove.updraft/updraft/badge.svg)](https://maven-badges.sml.io/sonatype-central/com.appswithlove.updraft/updraft) + This is a gradle plugin for automated upload to updraft. @@ -12,8 +14,6 @@ Preconditions: 1.Add the code below to you `build.gradle` file in the project root folder. -[![Maven Central](https://maven-badges.sml.io/sonatype-central/com.appswithlove.updraft/updraft/badge.svg)](https://maven-badges.sml.io/sonatype-central/com.appswithlove.updraft/updraft) - ```groovy buildscript { repositories { @@ -48,7 +48,7 @@ or id("com.appswithlove.updraft") ``` -3.Add one or multiple `urls['YOURPRODUCTFLAVOUR']` wrapped in `updraft` to the file. To get the url, go to your Updraft App and get the https:// url part of the `curl` command. (e.g. [https://app.getupdraft.com/api_upload/.../.../]()) +3.Add one or multiple URLs wrapped in `updraft` to the file. To get the url, go to your Updraft App and get the https:// url part of the `curl` command. (e.g. [https://app.getupdraft.com/api/app_upload/.../.../]()) With this, the plugin knows to which updraft app your apk should be uploaded. The part `YourBuildVariant` should be replaced by the exact name your build variant. For example: @@ -56,8 +56,10 @@ The part `YourBuildVariant` should be replaced by the exact name your build vari ```groovy updraft { - urls['StagingRelease'] = ["your/staging/url/"] - urls['ProdRelease'] = ["your/prod/url/", "your/prod2/url/"] + urls = [ + "StagingRelease": ["your/staging/url/"], + "ProdRelease": ["your/prod/url/", "your/prod2/url/"] + ] } ``` From 1eca069087ddfde5c9eb904603b63ce12c2e4d7c Mon Sep 17 00:00:00 2001 From: Vladislav Frolov Date: Wed, 22 Oct 2025 11:26:40 +0200 Subject: [PATCH 2/5] update README.md --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 00eee74..2f65c02 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,14 @@ or id("com.appswithlove.updraft") ``` -3.Add one or multiple URLs wrapped in `updraft` to the file. To get the url, go to your Updraft App and get the https:// url part of the `curl` command. (e.g. [https://app.getupdraft.com/api/app_upload/.../.../]()) -With this, the plugin knows to which updraft app your apk should be uploaded. +3.Configure URLs for your build variants -The part `YourBuildVariant` should be replaced by the exact name your build variant. For example: +Add one or more urls entries inside your `updraft` configuration block. +Each entry maps a build variant name (e.g., `StagingRelease`, `ProdRelease`) to one or more upload URLs. + +To get the correct URL, open your Updraft App, copy the https:// part from the curl command (e.g. https://app.getupdraft.com/api/app_upload/.../.../), and paste it as shown below. + +This tells the plugin where to upload your APK/AAB files for each build variant. ```groovy From f10f5df58871066ffbc5eab6e74d472345b34c98 Mon Sep 17 00:00:00 2001 From: Vladislav Frolov Date: Tue, 20 Jan 2026 13:23:10 +0100 Subject: [PATCH 3/5] upgrade AGP to version 9.0.0 --- README.md | 11 ++++++++--- build.gradle.kts | 1 - gradle.properties | 4 +--- gradle/libs.versions.toml | 5 ++--- gradle/wrapper/gradle-wrapper.properties | 2 +- lib/build.gradle.kts | 9 ++++++++- .../kotlin/com/appswithlove/updraft/UpdraftPlugin.kt | 9 +++++---- sample/build.gradle.kts | 1 - 8 files changed, 25 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 2f65c02..5e1e8af 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ This is a gradle plugin for automated upload to updraft. +## ⚠️ Requirements for v3.0.0+ + +**Important:** Version `3.0.0` and above requires **Android Gradle Plugin (AGP) 9.0** or higher. + +If your project relies on an older version of AGP, please stick to plugin version `2.x.x` until you are ready to upgrade your gradle environment. ## Instructions @@ -23,7 +28,7 @@ buildscript { dependencies { // ... - classpath 'com.appswithlove.updraft:updraft:2.3.0' + classpath 'com.appswithlove.updraft:updraft:3.0.0' } } ``` @@ -32,7 +37,7 @@ or ```kotlin plugins { - id("com.appswithlove.updraft") version "2.3.0" + id("com.appswithlove.updraft") version "3.0.0" } ``` @@ -120,7 +125,7 @@ buildscript { // ... } dependencies { - classpath 'com.appswithlove.updraft:updraft:2.3.0' + classpath 'com.appswithlove.updraft:updraft:3.0.0' // ... } } diff --git a/build.gradle.kts b/build.gradle.kts index 6e07c3c..cce42ab 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,6 @@ buildscript { plugins { alias(libs.plugins.android.application) apply false - alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.compose) apply false alias(libs.plugins.updraft) apply false alias(libs.plugins.maven.publish) apply false diff --git a/gradle.properties b/gradle.properties index a2b2d8a..bc2b64a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ GROUP=com.appswithlove.updraft POM_ARTIFACT_ID=updraft -VERSION_NAME=2.3.0 +VERSION_NAME=3.0.0 POM_NAME=updraft-plugin-android POM_DESCRIPTION=This is a gradle Android plugin for automated uploads to Updraft @@ -44,9 +44,7 @@ SONATYPE_AUTOMATIC_RELEASE=true RELEASE_SIGNING_ENABLED=true android.useAndroidX=true -android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=false -android.nonFinalResIds=false # Enables Gradle caching org.gradle.caching=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c4d8c5b..e913296 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -agp = "8.11.1" +agp = "9.0.0" kotlin = "2.2.20" composeBom = "2025.10.00" activityCompose = "1.11.0" @@ -8,7 +8,7 @@ lifecycleRuntimeKtx = "2.9.4" cglibNodep = "3.3.0" dokkaGradlePlugin = "2.0.0" junit = "4.13.2" -updraft = "2.2.9" +updraft = "2.4.0" maven-publish = "0.34.0" gradle-publish = "2.0.0" coveralls = "2.4.0" @@ -32,7 +32,6 @@ kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.re [plugins] android-application = { id = "com.android.application", version.ref = "agp" } -kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } updraft = { id = "com.appswithlove.updraft", version.ref = "updraft" } maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dcf5dbf..de18eab 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Oct 20 07:59:33 CEST 2017 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index d4cc35e..f1a8adc 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -85,8 +85,15 @@ gradlePlugin { signing { val signingInMemoryKey = project.findProperty("signingInMemoryKey") as String? val signingInMemoryPassword = project.findProperty("signingInMemoryPassword") as String? + + val isReleaseSigningEnabled = project.findProperty("RELEASE_SIGNING_ENABLED")?.toString()?.toBoolean() == true + isRequired = isReleaseSigningEnabled + if (signingInMemoryKey != null && signingInMemoryPassword != null) { useInMemoryPgpKeys(signingInMemoryKey, signingInMemoryPassword) - sign(publishing.publications) + + if (isReleaseSigningEnabled) { + sign(publishing.publications) + } } } diff --git a/lib/src/main/kotlin/com/appswithlove/updraft/UpdraftPlugin.kt b/lib/src/main/kotlin/com/appswithlove/updraft/UpdraftPlugin.kt index 94b4201..b560805 100644 --- a/lib/src/main/kotlin/com/appswithlove/updraft/UpdraftPlugin.kt +++ b/lib/src/main/kotlin/com/appswithlove/updraft/UpdraftPlugin.kt @@ -1,5 +1,6 @@ package com.appswithlove.updraft +import com.android.build.api.variant.ApplicationAndroidComponentsExtension import org.gradle.api.GradleException import org.gradle.api.Plugin import org.gradle.api.Project @@ -12,12 +13,12 @@ class UpdraftPlugin : Plugin { override fun apply(project: Project) { val updraftExtension = project.extensions.create("updraft", UpdraftExtension::class.java) - val android = project.extensions.getByName("android") as com.android.build.gradle.AppExtension - android.applicationVariants.all { variant -> + val androidComponents = project.extensions.getByType(ApplicationAndroidComponentsExtension::class.java) + androidComponents.onVariants { variant -> val variantName = variant.name val variantNameCapitalized = variantName.replaceFirstChar { it.uppercase() } val flavorName = variant.flavorName - val buildTypeName = variant.buildType.name + val buildTypeName = variant.buildType // Providers val uploadUrlsProvider = project.providers.provider { updraftExtension.urls } @@ -33,7 +34,7 @@ class UpdraftPlugin : Plugin { val gitTagsProvider = project.providers.of(GitTagsValueSource::class.java) {} val gitCommitProvider = project.providers.of(GitCommitValueSource::class.java) {} val gitUrlProvider = project.providers.of(GitUrlValueSource::class.java) {} - val flavors = variant.productFlavors.map { it.name } + val flavors = variant.productFlavors.map { it.second } val releaseNotesProvider = project.providers.provider { getReleaseNotes(project, flavors, updraftExtension) } diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index cb96a3a..d28bdb6 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -3,7 +3,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile plugins { alias(libs.plugins.android.application) - alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.compose) alias(libs.plugins.updraft) } From d088eaff0e72136789d64d8dea54818eb8c9ea89 Mon Sep 17 00:00:00 2001 From: Vladislav Frolov Date: Tue, 20 Jan 2026 13:47:05 +0100 Subject: [PATCH 4/5] fix sample app's dependencies --- build.gradle.kts | 3 ++- gradle/libs.versions.toml | 5 +++-- sample/build.gradle.kts | 16 +++++++++------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index cce42ab..2625c9e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,10 +11,11 @@ buildscript { plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.compose) apply false - alias(libs.plugins.updraft) apply false alias(libs.plugins.maven.publish) apply false alias(libs.plugins.gradle.publish) apply false alias(libs.plugins.coveralls) alias(libs.plugins.kotlin.jvm) apply false id("signing") + // Define Updraft plugin + // alias(libs.plugins.updraft) apply false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e913296..2edf98b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ lifecycleRuntimeKtx = "2.9.4" cglibNodep = "3.3.0" dokkaGradlePlugin = "2.0.0" junit = "4.13.2" -updraft = "2.4.0" +updraft = "1.3.0" maven-publish = "0.34.0" gradle-publish = "2.0.0" coveralls = "2.4.0" @@ -33,8 +33,9 @@ kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.re [plugins] android-application = { id = "com.android.application", version.ref = "agp" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } -updraft = { id = "com.appswithlove.updraft", version.ref = "updraft" } maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" } gradle-publish = { id = "com.gradle.plugin-publish", version.ref = "gradle-publish" } coveralls = { id = "com.github.kt3k.coveralls", version.ref = "coveralls" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +# Define Updraft plugin +# updraft = { id = "com.appswithlove.updraft", version.ref = "updraft" } \ No newline at end of file diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts index d28bdb6..033fc8f 100644 --- a/sample/build.gradle.kts +++ b/sample/build.gradle.kts @@ -4,7 +4,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.compose) - alias(libs.plugins.updraft) + // Apply Updraft plugin + // alias(libs.plugins.updraft) } android { @@ -72,12 +73,13 @@ kotlin { jvmToolchain(11) } -updraft { - urls = mapOf( - "StageDebug" to listOf("https://app.getupdraft.com/api_upload/.../.../"), - "ProdRelease" to listOf("https://app.getupdraft.com/api_upload/.../.../"), - ) -} +// Configure URLs for your build variants +// updraft { +// urls = mapOf( +// "StageDebug" to listOf("https://app.getupdraft.com/api_upload/.../.../"), +// "ProdRelease" to listOf("https://app.getupdraft.com/api_upload/.../.../"), +// ) +// } dependencies { implementation(platform(libs.compose.bom)) From 576f09cf908004f64cb21d257cd64d2e53fba40d Mon Sep 17 00:00:00 2001 From: Vladislav Frolov Date: Tue, 20 Jan 2026 13:55:17 +0100 Subject: [PATCH 5/5] fix sample app's dependencies --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2edf98b..9a300bb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ lifecycleRuntimeKtx = "2.9.4" cglibNodep = "3.3.0" dokkaGradlePlugin = "2.0.0" junit = "4.13.2" -updraft = "1.3.0" +updraft = "2.2.9" maven-publish = "0.34.0" gradle-publish = "2.0.0" coveralls = "2.4.0"