block is for importing libraries from repositories like MavenCentral. once you have added them to the build.gradle and reimported the project, you can simply use the
import
keyword to access them
LastExceed
03/14/2020, 2:14 PM
actually no, its not only for repositories. you can also import libraries from .jar files. same procedure basically
LastExceed
03/14/2020, 2:20 PM
can you be more specific about what exactly you're trying to do?
LastExceed
03/14/2020, 2:26 PM
are you aware that there already is a kotlin DSL for gradle?
LastExceed
03/14/2020, 2:26 PM
simply rename to build.gradle.kts
LastExceed
03/14/2020, 2:28 PM
so instead of changing to kotlin DSL or getting used to groovy you want to make your own conversion from kotlin to groovy? that sounds like a very bad idea