Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test change #677

Open
wants to merge 8 commits into
base: tmp/test-actions
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Android CI
name: ArcGIS Maps for Kotlin Toolkit

on:
pull_request:
Expand All @@ -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'
Expand All @@ -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 -PgithubAction=true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
10 changes: 9 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ 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.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"))
project.logger.info("release candidate build requested version ${project.properties["versionNumber"]}")
} else if (!project.hasProperty("versionNumber") && !project.hasProperty("buildNum")) {
Expand Down
23 changes: 17 additions & 6 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down Expand Up @@ -67,14 +72,20 @@ dependencyResolutionManagement {

versionCatalogs {
create("arcgis") {
val versionAndBuild = if (finalBuild) {
logger.warn(
"Requested release candidate for the SDK dependency $sdkVersionNumber"
)
sdkVersionNumber
val versionAndBuild = if (finalBuild || githubActionBuild) {
if (finalBuild) {
logger.warn(
"Requested release candidate for the SDK dependency $sdkVersionNumber"
)
} else {
logger.warn(
"Requested released version $sdkVersionNumber of the SDK dependency"
)
}
"200.5.0"//sdkVersionNumber
} else {
logger.warn("Maps SDK dependency: $sdkVersionNumber-$sdkBuildNumber")
"$sdkVersionNumber-$sdkBuildNumber"
"200.5.0"//"$sdkVersionNumber-$sdkBuildNumber"
}

version("mapsSdk", versionAndBuild)
Expand Down
Loading