File: build.gradle.kts

package info (click to toggle)
kotlin 1.3.31%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 109,524 kB
  • sloc: java: 454,753; xml: 18,599; javascript: 10,452; sh: 513; python: 97; makefile: 54; ansic: 4
file content (70 lines) | stat: -rw-r--r-- 1,816 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

description = "kotlinp"

plugins {
    kotlin("jvm")
}

val kotlinpAsmVersion = "7.0"

val shadows by configurations.creating

repositories {
    maven("https://jetbrains.bintray.com/intellij-third-party-dependencies/")
}

dependencies {
    compileOnly(project(":kotlinx-metadata"))
    compileOnly(project(":kotlinx-metadata-jvm"))
    compile("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion")

    testCompileOnly(project(":kotlinx-metadata"))
    testCompileOnly(project(":kotlinx-metadata-jvm"))
    testCompile(commonDep("junit:junit"))
    testCompile(projectTests(":generators:test-generator"))

    testRuntime(project(":kotlinx-metadata-jvm", configuration = "runtime"))

    shadows(project(":kotlinx-metadata-jvm", configuration = "runtime"))
    shadows("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion")
}

sourceSets {
    "main" { projectDefault() }
    "test" { projectDefault() }
}

projectTest {
    workingDir = rootDir
}

val generateTests by generator("org.jetbrains.kotlin.kotlinp.test.GenerateKotlinpTestsKt")

val shadowJar by task<ShadowJar> {
    classifier = "shadow"
    version = null
    configurations = listOf(shadows)
    from(mainSourceSet.output)
    manifest {
        attributes["Main-Class"] = "org.jetbrains.kotlin.kotlinp.Main"
    }
}

tasks {
    "assemble" {
        dependsOn(shadowJar)
    }
    "test" {
        // These dependencies are needed because ForTestCompileRuntime loads jars from dist
        dependsOn(":kotlin-reflect:dist")
        dependsOn(":kotlin-script-runtime:dist")
    }
}

tasks.withType<KotlinCompile> {
    kotlinOptions {
        freeCompilerArgs += listOf("-Xuse-experimental=kotlin.Experimental")
    }
}