A tool for patching Gradle build scripts with newer Kotlin versions, meant for testing
-
Download a binary distribution from the releases page
-
Unpack it and run
bin/kotlin-version-changer
orbin/kotlin-version-changer.bat
, depending on your OS, with the parameters:--project
-- project root directory, e.g.C:\kotlin-gradle-test\
--version
-- target Kotlin version, e.g.1.1.2-eap-44
--destination
-- destination to copy the project, process in place if not provided--repository
-- repository to add to buildscript and project, one ofDEV
,EAP
,EAP12
,LOCAL
--freeCompilerArgs
-- a list of additional compiler arguments that will be passed to the compiler
Example:
kotlin-version-changer.bat --project C:\kotlin-gradle-test\ --version 1.2-M2 --repository EAP12 --freeCompilerArgs "-Xprogressive -XXLanguage:+NewInference"
This tool does not analyze extension variables like ext.kotlin_version
, instead, the versions are changed directly in the dependency declarations.
Also, this tool is not meant for the projects you work with, because it does not follow Gradle idioms.