简体   繁体   中英

Apply plugin from rootproject file in kotlin dsl gradle file

Currently I applying a root project plugin in App Level gradle file using groovy. Here is the code for it:

apply from : rootProject . file ("jacoco.gradle")

Now I want to change gradle file from groovy to kotlin dsl. Can you please guide me, how can I aplly this plugin in app level kts gradle file.

apply(from = rootProject.file("jacoco.gradle"))

There's an official guide from Gradle docs that shows you how to do it.

You can find it here: https://docs.gradle.org/current/userguide/migrating_from_groovy_to_kotlin_dsl.html

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