Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore(infra): Prepare atomicfu for including to the Kotlin Aggregate …
…build //KTI-1016 Parametrize kotlin api version, kotlin language version. Support passing an url for a kotlin compiler repository, drop space kotlin/dev repo from dependencies: Kotlin compiler artifacts should be downloaded from maven central by default. In case of compiling with not-published into the MC kotlin compiler artifacts, a kotlin_repo_url should be specified as a gradle parameter(E.g. space kotlin/dev repo).
- Loading branch information
Showing
6 changed files
with
70 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@file:JvmName("KotlinAggregateBuild") | ||
|
||
import org.gradle.api.Project | ||
import java.util.logging.Logger | ||
|
||
val LOGGER: Logger = Logger.getLogger("Kotlin settings logger") | ||
|
||
/* | ||
* Should be used for running against of non-released Kotlin compiler on a system test level | ||
* @return a Kotlin API version parametrized from command line nor gradle.properties, null otherwise | ||
* */ | ||
fun getKotlinApiVersion(project: Project): String? { | ||
val apiVersion = project.rootProject.properties["kotlin_api_version"] as? String | ||
if (apiVersion != null) | ||
LOGGER.info("""Configured Kotlin API version: '$apiVersion' for project $${project.name}""") | ||
return apiVersion | ||
} | ||
|
||
/* | ||
* Should be used for running against of non-released Kotlin compiler on a system test level | ||
* @return a Kotlin Language version parametrized from command line nor gradle.properties, null otherwise | ||
* */ | ||
fun getKotlinLanguageVersion(project: Project): String? { | ||
val languageVersion = project.rootProject.properties["kotlin_language_version"] as? String | ||
if (languageVersion != null) | ||
LOGGER.info("""Configured Kotlin Language version: '$languageVersion' for project ${project.name}""") | ||
return languageVersion | ||
} | ||
|
||
/* | ||
* Should be used for running against of non-released Kotlin compiler on a system test level | ||
* Kotlin compiler artifacts are expected to be downloaded from maven central by default. | ||
* In case of compiling with not-published into the MC kotlin compiler artifacts, a kotlin_repo_url gradle parameter should be specified. | ||
* To reproduce a build locally, a kotlin/dev repo should be passed | ||
* @return an url for a kotlin compiler repository parametrized from command line nor gradle.properties, empty string otherwise | ||
* */ | ||
fun getKotlinDevRepositoryUrl(project: Project): String { | ||
val url = (project.rootProject.properties["kotlin_repo_url"] ?: "") as String | ||
if (url != "") | ||
LOGGER.info("""Configured Kotlin Compiler repository url: '$url' for project ${project.name}""") | ||
return url | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters