Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame^] | 1 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 2 | |
| 3 | /* |
| 4 | * This file was generated by the Gradle 'init' task. |
| 5 | * |
| 6 | * This generated file contains a sample Kotlin application project to get you started. |
| 7 | * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle |
| 8 | * User Manual available at https://docs.gradle.org/7.4.2/userguide/building_java_projects.html |
| 9 | */ |
| 10 | |
| 11 | |
| 12 | plugins { |
| 13 | // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. |
| 14 | id 'org.jetbrains.kotlin.jvm' version '1.9.22' |
| 15 | |
| 16 | // Apply the application plugin to add support for building a CLI application in Java. |
| 17 | id 'application' |
| 18 | id 'com.github.johnrengelman.shadow' version '7.1.2' |
| 19 | } |
| 20 | |
| 21 | |
| 22 | repositories { |
| 23 | // Use Maven Central for resolving dependencies. |
| 24 | mavenCentral() |
| 25 | } |
| 26 | |
| 27 | dependencies { |
| 28 | // Align versions of all Kotlin components |
| 29 | implementation platform('org.jetbrains.kotlin:kotlin-bom') |
| 30 | |
| 31 | // Use the Kotlin JDK 8 standard library. |
| 32 | implementation 'org.jetbrains.kotlin:kotlin-stdlib' |
| 33 | |
| 34 | // This dependency is used by the application. |
| 35 | implementation 'com.google.guava:guava:33.0.0-jre' |
| 36 | |
| 37 | // Use the Kotlin test library. |
| 38 | testImplementation 'org.jetbrains.kotlin:kotlin-test' |
| 39 | |
| 40 | // Use the Kotlin JUnit integration. |
| 41 | testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' |
| 42 | testImplementation "org.jetbrains.kotlin:kotlin-test:1.9.22" |
| 43 | } |
| 44 | |
| 45 | |
| 46 | application { |
| 47 | // Define the main class for the application. |
| 48 | mainClass = 'de.ids_mannheim.korapxml2conllu.AppKt' |
| 49 | } |
| 50 | |
| 51 | jar { |
| 52 | // Will include every single one of your dependencies, project or not |
| 53 | def lowerCasedName = baseName.toLowerCase() |
| 54 | def normalizedName = lowerCasedName.substring(0,1).toUpperCase() + lowerCasedName.substring(1) |
| 55 | |
| 56 | manifest.attributes( |
| 57 | 'Class-Path': configurations.compileClasspath.collect { it.getName() }.join(' '), |
| 58 | 'Main-Class': "de.ids_mannheim.korapxml2conllu.AppKt" |
| 59 | ) |
| 60 | |
| 61 | } |
| 62 | |
| 63 | |
| 64 | configurations { |
| 65 | runtimeLib.extendsFrom implementation |
| 66 | } |
| 67 | |
| 68 | tasks.withType(KotlinCompile).configureEach { |
| 69 | kotlinOptions { |
| 70 | jvmTarget = '17' |
| 71 | } |
| 72 | } |