Extract kotlinLanguageVersion to gradle.properties

Read it when building docs in order to keep
docs version filter/language analyzer version in sync with
the language version used to compile libraries.
This commit is contained in:
Ilya Gorbunov
2023-02-19 08:01:21 +01:00
committed by Space Team
parent 28ae0c1649
commit 3b97bfb426
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ val kotlinVersion by extra(
} ?: buildNumber } ?: buildNumber
) )
val kotlinLanguageVersion by extra("1.9") val kotlinLanguageVersion: String by extra
extra["kotlin_root"] = rootDir extra["kotlin_root"] = rootDir
+1
View File
@@ -31,6 +31,7 @@ systemProp.org.gradle.kotlin.dsl.precompiled.accessors.strict=true
cacheRedirectorEnabled=true cacheRedirectorEnabled=true
defaultSnapshotVersion=1.9.255-SNAPSHOT defaultSnapshotVersion=1.9.255-SNAPSHOT
kotlinLanguageVersion=1.9
kotlin.build.gradlePlugin.version=0.0.39 kotlin.build.gradlePlugin.version=0.0.39
@@ -18,6 +18,7 @@ val rootProperties = java.util.Properties().apply {
file(kotlin_root).resolve("gradle.properties").inputStream().use { stream -> load(stream) } file(kotlin_root).resolve("gradle.properties").inputStream().use { stream -> load(stream) }
} }
val defaultSnapshotVersion: String by rootProperties val defaultSnapshotVersion: String by rootProperties
val kotlinLanguageVersion: String by rootProperties
val githubRevision = if (isTeamcityBuild) project.property("githubRevision") else "master" val githubRevision = if (isTeamcityBuild) project.property("githubRevision") else "master"
val artifactsVersion by extra(if (isTeamcityBuild) project.property("deployVersion") as String else defaultSnapshotVersion) val artifactsVersion by extra(if (isTeamcityBuild) project.property("deployVersion") as String else defaultSnapshotVersion)
@@ -28,6 +29,7 @@ println("# Parameters summary:")
println(" isTeamcityBuild: $isTeamcityBuild") println(" isTeamcityBuild: $isTeamcityBuild")
println(" dokka version: $dokka_version") println(" dokka version: $dokka_version")
println(" githubRevision: $githubRevision") println(" githubRevision: $githubRevision")
println(" language version: $kotlinLanguageVersion")
println(" artifacts version: $artifactsVersion") println(" artifacts version: $artifactsVersion")
println(" artifacts repo: $artifactsRepo") println(" artifacts repo: $artifactsRepo")
@@ -387,7 +389,7 @@ fun GradleDokkaSourceSetBuilder.sourceLinksFromRoot() {
} }
run { run {
val versions = listOf(/*"1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7",*/ "1.8") val versions = listOf(/*"1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7",*/ kotlinLanguageVersion)
val latestVersion = versions.last() val latestVersion = versions.last()
// builds this version/all versions as historical for the next versions builds // builds this version/all versions as historical for the next versions builds