code-examples/2025/01/kotlin_demo1/build.gradle

49 lines
817 B
Groovy

plugins {
id 'idea'
id "org.jetbrains.kotlin.jvm" version "2.1.0"
}
repositories {
mavenCentral()
}
dependencies {
implementation 'ch.qos.logback:logback-classic:1.5.16'
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
kotlin {
jvmToolchain(17)
}
tasks.register('runApp', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = "pl.polgrabia.demos.kotlin.ProgramKt"
}
tasks.register('fetchSources') {
/**
def classpath = sourceSets.main.runtimeClasspath
classpath.each {
println it.class
}
**/
project.configurations.implementation.allDependencies.each { dep ->
// println("${dep.group}:${dep.name}:${dep.version}")
dep.class.methods.each {
println(it)
}
// TODO implement fetching it from repositories
}
}