Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 1 | plugins { |
| 2 | // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. |
Marc Kupietz | e252312 | 2025-01-15 11:26:31 +0100 | [diff] [blame^] | 3 | id 'org.jetbrains.kotlin.jvm' version '2.1.0' |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 4 | |
| 5 | // Apply the application plugin to add support for building a CLI application in Java. |
| 6 | id 'application' |
Marc Kupietz | 1b59599 | 2024-03-01 14:54:30 +0100 | [diff] [blame] | 7 | id 'com.github.johnrengelman.shadow' version '8.1.1' |
Marc Kupietz | e252312 | 2025-01-15 11:26:31 +0100 | [diff] [blame^] | 8 | id ("org.jetbrains.kotlin.kapt") version "2.1.0" |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 9 | } |
| 10 | |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 11 | repositories { |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 12 | mavenCentral() |
Marc Kupietz | 56a4556 | 2024-03-20 20:18:08 +0100 | [diff] [blame] | 13 | maven { url 'https://jitpack.io' } |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 14 | } |
| 15 | |
Marc Kupietz | 47b43c3 | 2024-03-27 20:43:32 +0100 | [diff] [blame] | 16 | test { |
| 17 | minHeapSize = "1000m" // initial heap size |
| 18 | maxHeapSize = "8000m" // maximum heap size |
| 19 | jvmArgs '-XX:MaxMetaspaceSize=8000m' // mem argument for the test JVM |
| 20 | } |
| 21 | |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 22 | dependencies { |
| 23 | // Align versions of all Kotlin components |
| 24 | implementation platform('org.jetbrains.kotlin:kotlin-bom') |
| 25 | |
| 26 | // Use the Kotlin JDK 8 standard library. |
| 27 | implementation 'org.jetbrains.kotlin:kotlin-stdlib' |
Marc Kupietz | e252312 | 2025-01-15 11:26:31 +0100 | [diff] [blame^] | 28 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1' |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 29 | |
| 30 | // This dependency is used by the application. |
Marc Kupietz | e252312 | 2025-01-15 11:26:31 +0100 | [diff] [blame^] | 31 | implementation 'com.google.guava:guava:33.4.0-jre' |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 32 | |
Marc Kupietz | 3112236 | 2024-03-02 11:13:37 +0100 | [diff] [blame] | 33 | |
Marc Kupietz | 916bdfe | 2024-09-20 09:02:57 +0200 | [diff] [blame] | 34 | kapt("info.picocli:picocli-codegen:4.7.6") |
| 35 | implementation ("info.picocli:picocli:4.7.6") |
Marc Kupietz | 3112236 | 2024-03-02 11:13:37 +0100 | [diff] [blame] | 36 | |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 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' |
Marc Kupietz | e252312 | 2025-01-15 11:26:31 +0100 | [diff] [blame^] | 42 | testImplementation "org.jetbrains.kotlin:kotlin-test:2.1.0" |
Marc Kupietz | 0c6e877 | 2024-03-19 07:03:07 +0100 | [diff] [blame] | 43 | |
Marc Kupietz | 1465ce2 | 2024-03-26 09:51:17 +0100 | [diff] [blame] | 44 | implementation 'com.github.kupietz:cistern:v1.0.4' |
Marc Kupietz | af682a4 | 2024-03-22 06:51:55 +0100 | [diff] [blame] | 45 | implementation 'org.maltparser:maltparser:1.9.2' |
Marc Kupietz | e252312 | 2025-01-15 11:26:31 +0100 | [diff] [blame^] | 46 | implementation 'org.apache.opennlp:opennlp-tools:2.5.3' |
Marc Kupietz | 9da19db | 2024-04-01 11:06:51 +0200 | [diff] [blame] | 47 | implementation 'org.slf4j:slf4j-simple:2.1.0-alpha1' |
Marc Kupietz | 916bdfe | 2024-09-20 09:02:57 +0200 | [diff] [blame] | 48 | implementation 'org.apache.ant:ant:1.10.15' |
Marc Kupietz | a92bacb | 2024-04-06 20:26:05 +0200 | [diff] [blame] | 49 | |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | |
Marc Kupietz | 9da19db | 2024-04-01 11:06:51 +0200 | [diff] [blame] | 53 | |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 54 | application { |
| 55 | // Define the main class for the application. |
Marc Kupietz | 1b59599 | 2024-03-01 14:54:30 +0100 | [diff] [blame] | 56 | mainClass = 'de.ids_mannheim.korapxmltools.KorapXml2ConlluKt' |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | jar { |
| 60 | // Will include every single one of your dependencies, project or not |
Marc Kupietz | fb0a2ca | 2024-03-01 12:38:05 +0100 | [diff] [blame] | 61 | // def lowerCasedName = baseName.toLowerCase() |
| 62 | // def normalizedName = lowerCasedName.substring(0,1).toUpperCase() + lowerCasedName.substring(1) |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 63 | |
| 64 | manifest.attributes( |
| 65 | 'Class-Path': configurations.compileClasspath.collect { it.getName() }.join(' '), |
Marc Kupietz | 1b59599 | 2024-03-01 14:54:30 +0100 | [diff] [blame] | 66 | 'Main-Class': "de.ids_mannheim.korapxmltools.KorapXml2ConlluKt" |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 67 | ) |
Marc Kupietz | 1b59599 | 2024-03-01 14:54:30 +0100 | [diff] [blame] | 68 | shadowJar { |
| 69 | archiveBaseName.set('korapxml2conllu') |
| 70 | archiveClassifier.set('') |
| 71 | archiveVersion.set('') |
| 72 | } |
Marc Kupietz | 4f6ed42 | 2024-03-01 07:27:46 +0100 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | |
| 76 | configurations { |
| 77 | runtimeLib.extendsFrom implementation |
| 78 | } |