Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buildscript {
- ext.kotlin_version = '1.4.30'
- repositories { mavenCentral() }
- dependencies {
- classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
- }
- }
- plugins {
- id 'org.jetbrains.kotlin.jvm' version '1.5.0-M2'
- id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.30'
- id 'application'
- }
- rootProject.ext.distDir = "$rootDir/build/dist"
- rootProject.ext.binDir = "$distDir/bin"
- rootProject.ext.libsDir = "$distDir/lib"
- rootProject.ext.mainClassName = "org.main.MainKt"
- jar {
- destinationDirectory = file("$buildDir/dist")
- manifest {
- attributes('Main-Class': "org.main.MainKt")
- }
- }
- task collectDependencies(type: Copy) {
- dependsOn jar
- into rootProject.libsDir
- from configurations.runtime
- }
- task createStartScripts(type: CreateStartScripts) {
- dependsOn collectDependencies
- outputDir = file(rootProject.binDir)
- mainClassName = "$rootProject.mainClassName"
- applicationName = "$rootProject.name"
- classpath = fileTree(rootProject.libsDir)
- }
- group = 'me.arseny'
- version = '1.0.0'
- repositories {
- mavenCentral()
- }
- dependencies {
- testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
- testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
- testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
- implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0"
- }
- test {
- useJUnitPlatform()
- }
- compileKotlin {
- kotlinOptions.jvmTarget = '13'
- }
- compileTestKotlin {
- kotlinOptions.jvmTarget = '13'
- }
- application {
- mainClassName = 'org.main.MainKt'
- }
Add Comment
Please, Sign In to add comment