From f8ab23fc7234edc9809637b07d73cd04a34eaece Mon Sep 17 00:00:00 2001 From: Soren Roth Date: Thu, 21 Nov 2024 13:45:30 -0800 Subject: [PATCH 1/7] add test change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b2b85e1e..8b79c1ef1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ArcGIS Maps SDK for Kotlin Toolkit +# ArcGIS Maps SDK for Kotlin Toolkit!!! The ArcGIS Maps SDK for Kotlin Toolkit contains components that will simplify your Kotlin app development. It is built off of the new ArcGIS Maps SDK for Kotlin. From 6693dd32be6941f8601c97c9231eeded77c179d8 Mon Sep 17 00:00:00 2001 From: Soren Roth Date: Thu, 21 Nov 2024 13:57:46 -0800 Subject: [PATCH 2/7] pull the released version of the SDK by specifying finalBuild --- .github/workflows/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b716e7f78..d9fc79786 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Android CI +name: ArcGIS Maps for Kotlin Toolkit on: pull_request: @@ -21,4 +21,4 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build toolkit project - run: ./gradlew check + run: ./gradlew check -PfinalBuild=true From 173bcf85d63478a20eaf0b4097799fa0db871afb Mon Sep 17 00:00:00 2001 From: Soren Roth Date: Thu, 21 Nov 2024 14:09:58 -0800 Subject: [PATCH 3/7] pull the released version of the SDK by specifying finalBuild --- build.gradle.kts | 8 +++++++- settings.gradle.kts | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d678be7e9..6df7fe1db 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,7 +42,13 @@ buildscript { val finalBuild: Boolean = (project.properties["finalBuild"] ?: "false") .run { this == "true" } - if (finalBuild) { + val githubAction: Boolean = (project.properties["githubAction"] ?: "false") + .run { this == "true" } + + if (githubAction) { + check(project.hasProperty("sdkVersionNumber")) + project.logger.info("github action build requested with SDK version ${project.properties["sdkVersionNumber"]}") + } else if (finalBuild || githubAction) { check(project.hasProperty("versionNumber")) project.logger.info("release candidate build requested version ${project.properties["versionNumber"]}") } else if (!project.hasProperty("versionNumber") && !project.hasProperty("buildNum")) { diff --git a/settings.gradle.kts b/settings.gradle.kts index 678f6e4e8..51b35debf 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -24,6 +24,11 @@ pluginManagement { } } +// For github actions the build is not able to access our internal maven repo, use a released SDK. +val githubActionBuild: Boolean = (providers.gradleProperty("githubAction").orNull ?: "false") + .run { this == "true" } + + // For finalBuilds ignore the build number and pick up the released version of the SDK dependency val finalBuild: Boolean = (providers.gradleProperty("finalBuild").orNull ?: "false") .run { this == "true" } @@ -67,7 +72,7 @@ dependencyResolutionManagement { versionCatalogs { create("arcgis") { - val versionAndBuild = if (finalBuild) { + val versionAndBuild = if (finalBuild || githubActionBuild) { logger.warn( "Requested release candidate for the SDK dependency $sdkVersionNumber" ) From 03c03eb6f27a35e2e8e48b39346eed26ab2db6b8 Mon Sep 17 00:00:00 2001 From: Soren Roth Date: Thu, 21 Nov 2024 14:12:46 -0800 Subject: [PATCH 4/7] pull the released version of the SDK by specifying finalBuild --- .github/workflows/check.yml | 4 ++-- build.gradle.kts | 2 +- settings.gradle.kts | 12 +++++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d9fc79786..c58052de2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: set up JDK 11 + - name: set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' @@ -21,4 +21,4 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build toolkit project - run: ./gradlew check -PfinalBuild=true + run: ./gradlew check -PgithubAction=true diff --git a/build.gradle.kts b/build.gradle.kts index 6df7fe1db..3f3092812 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,7 +44,7 @@ buildscript { val githubAction: Boolean = (project.properties["githubAction"] ?: "false") .run { this == "true" } - + if (githubAction) { check(project.hasProperty("sdkVersionNumber")) project.logger.info("github action build requested with SDK version ${project.properties["sdkVersionNumber"]}") diff --git a/settings.gradle.kts b/settings.gradle.kts index 51b35debf..3a8ca20ee 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -73,9 +73,15 @@ dependencyResolutionManagement { versionCatalogs { create("arcgis") { val versionAndBuild = if (finalBuild || githubActionBuild) { - logger.warn( - "Requested release candidate for the SDK dependency $sdkVersionNumber" - ) + if (finalBuild) { + logger.warn( + "Requested release candidate for the SDK dependency $sdkVersionNumber" + ) + } else { + logger.warn( + "Requested released version $sdkVersionNumber of the SDK dependency" + ) + } sdkVersionNumber } else { logger.warn("Maps SDK dependency: $sdkVersionNumber-$sdkBuildNumber") From 3bacfa8759e65a4d1590442d83f622fc89280b01 Mon Sep 17 00:00:00 2001 From: sorenoid Date: Thu, 21 Nov 2024 16:12:55 -0800 Subject: [PATCH 5/7] set versionNumber in github action CI --- build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3f3092812..9d33885f5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,8 +47,9 @@ buildscript { if (githubAction) { check(project.hasProperty("sdkVersionNumber")) + project.extra.set("versionNumber", "UNUSED") project.logger.info("github action build requested with SDK version ${project.properties["sdkVersionNumber"]}") - } else if (finalBuild || githubAction) { + } else if (finalBuild) { check(project.hasProperty("versionNumber")) project.logger.info("release candidate build requested version ${project.properties["versionNumber"]}") } else if (!project.hasProperty("versionNumber") && !project.hasProperty("buildNum")) { From 771bf1f53b50b192240b02f5e8e33578674969dd Mon Sep 17 00:00:00 2001 From: sorenoid Date: Thu, 21 Nov 2024 16:19:02 -0800 Subject: [PATCH 6/7] set versionNumber in github action CI --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index 9d33885f5..007021d98 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,6 +48,7 @@ buildscript { if (githubAction) { check(project.hasProperty("sdkVersionNumber")) project.extra.set("versionNumber", "UNUSED") + project.extra.set("buildNumber", "UNUSED") project.logger.info("github action build requested with SDK version ${project.properties["sdkVersionNumber"]}") } else if (finalBuild) { check(project.hasProperty("versionNumber")) From 8410a46ceac7f2ea30bfefe5ebd99e9befaef088 Mon Sep 17 00:00:00 2001 From: sorenoid Date: Thu, 21 Nov 2024 16:22:56 -0800 Subject: [PATCH 7/7] test code to be removed --- settings.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 3a8ca20ee..fcce2b527 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -82,10 +82,10 @@ dependencyResolutionManagement { "Requested released version $sdkVersionNumber of the SDK dependency" ) } - sdkVersionNumber + "200.5.0"//sdkVersionNumber } else { logger.warn("Maps SDK dependency: $sdkVersionNumber-$sdkBuildNumber") - "$sdkVersionNumber-$sdkBuildNumber" + "200.5.0"//"$sdkVersionNumber-$sdkBuildNumber" } version("mapsSdk", versionAndBuild)