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

Update sdkVersionNumber #686

Open
wants to merge 2 commits into
base: v.next
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
12 changes: 7 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ artifactoryUsername=""
artifactoryPassword=""

# These versions define the dependency of the ArcGIS Maps SDK for Kotlin dependency
# when building the toolkit locally, typically from Android Studio. When building the toolkit
# with CI, these versions are obtained from command line provided properties, see sdkVersionNumber
# in settings.gradle.kts.
sdkVersionNumber=200.6.0
sdkBuildNumber=
# when building the toolkit locally, typically from Android Studio.
# You will need to specify the build version in local.properties.
# Example:
# sdkBuildNumber=4441
# When building the toolkit with CI, these versions are obtained from command line provided properties,
# see sdkVersionNumber in settings.gradle.kts.
sdkVersionNumber=200.7.0
10 changes: 7 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ pluginManagement {
val finalBuild: Boolean = (providers.gradleProperty("finalBuild").orNull ?: "false")
.run { this == "true" }

val localProperties = java.util.Properties().apply {
load(file("local.properties").inputStream())
}

// The version of the ArcGIS Maps SDK for Kotlin dependency.
// First look for the version number provided via command line (for CI builds), if not found,
// take the one defined in gradle.properties.
Expand All @@ -39,12 +43,12 @@ val sdkVersionNumber: String =

// The build number of the ArcGIS Maps SDK for Kotlin dependency.
// First look for the version number provided via command line (for CI builds), if not found,
// take the one defined in gradle.properties.
// take the one defined in local.properties.
// CI builds pass -PbuildNumber=${BUILDNUM}
val sdkBuildNumber: String =
providers.gradleProperty("buildNumber").orNull
?: providers.gradleProperty("sdkBuildNumber").orNull
?: throw IllegalStateException("sdkBuildNumber must be set either via command line or in gradle.properties")
?: localProperties.getProperty("sdkBuildNumber")
?: throw IllegalStateException("sdkBuildNumber must be set either via command line or in local.properties")

dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
Expand Down