简体   繁体   中英

How to create an open class in the build.gradle file?

I've been trying to recreate an example from Gradle documentation( https://guides.gradle.org/writing-gradle-tasks/ ), but something went wrong. It says to add this code to the build.gradle.kts file它说将此代码添加到 build.gradle.kts 文件中

But when I tried to type the same thing in my project build.gradle file it won't compile

在此处输入图片说明

您应该将 Gradle 文件重命名为build.gradle.kts

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM