v0.13.1
版本发布时间: 2017-11-21 01:33:44
gradle/kotlin-dsl-samples最新发布版本:v1.1.3(2019-01-29 18:57:52)
Gradle Kotlin DSL 0.13.1 Release Notes
Gradle Kotlin DSL v0.13.1 brings support for settings.gradle.kts
files, Kotlin standard library extensions to the Java 7 and Java 8 APIs for use in build scripts, improvements to the plugins {}
DSL, and more!
v0.13.1 is included in Gradle 4.4 RC1.
The features in this release are also available for immediate use within the latest Gradle Kotlin DSL distribution snapshot. To use it, upgrade your Gradle wrapper in the following fashion:
$ cd $YOUR_PROJECT_ROOT
$ gradle wrapper --gradle-distribution-url
https://repo.gradle.org/gradle/kotlin-dsl-snapshots-local/gradle-kotlin-dsl-4.4-20171117171149+0000-all.zip
Once Gradle 4.4 RC1 is out, we encourage all users to upgrade in the following fashion:
$ cd $YOUR_PROJECT_ROOT
$ gradle wrapper --gradle-version 4.4-rc-1 --distribution-type all
Breaking changes
There are no breaking changes upgrading from 0.12.3 to 0.13.1.
Updates since v0.12.3
-
Support settings file written in Kotlin (#56). Gradle will now look for a file named
settings.gradle.kts
wheneversettings.gradle
cannot be found during the initialization phase.settings.gradle.kts
is evaluated against the Gradle Settings object so all of its members can be referenced without qualification. In addition, all members of the ScriptApi interface are supported and can also be referenced without qualification. Support for authoringsettings.gradle.kts
landed on IntelliJ IDEA starting with version1.1.60-eap-43
of the Kotlin plugin (#531):All samples have been updated to take advantage of
settings.gradle.kts
support (#550) and new samples have been added demonstrating how to usesettings.gradle.kts
to configure:- the build cache (#570, sample)
- dependency substitutions in composite builds (#571, sample)
- source dependencies (#572, sample)
-
Default
build-scan
plugin version is the same as the one applied by Gradle when the--scan
option is specified (#490). Prior to this release, the default version of thebuild-scan
plugin was hard-coded in thekotlin-dsl
distribution. That information is now managed by Gradle Core. -
Expose Kotlin standard library extensions for Java 7 and Java 8 to build scripts (#558). The build script classpath now includes
kotlin-stdlib-jre8
andkotlin-stdlib-jre7
enabling the use of features such as named regex groups, kotlin.streams among other things. -
Android sample update (#586). Now on Android Gradle Plugin 3.0.0 thanks to @liutikas. Thank you, @liutikas!
-
kotlin2js plugin sample updated to leverage the
plugins
block (#539). -
Account for
PropertyState
deprecation in favor ofProperty
(#540).org.gradle.api.provider.PropertyState
has been deprecated in favour oforg.gradle.api.provider.Property
. Samples and API extensions have been updated to take the change into account.