-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
75 lines (61 loc) · 1.87 KB
/
build.gradle.kts
File metadata and controls
75 lines (61 loc) · 1.87 KB
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
71
72
73
74
75
import org.jetbrains.kotlin.konan.CURRENT
import org.jetbrains.kotlin.konan.parseCompilerVersion
import java.io.*
buildscript {
repositories {
maven("https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies")
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.24-minamoto-1")
}
}
project.subprojects {
project.extra["version1"] = project.objects.property<org.jetbrains.kotlin.konan.CompilerVersion>().apply {
set("1.4.0-M1-3245".parseCompilerVersion())
}
}
val generateVersion = tasks.register<org.jetbrains.VersionGenerator>("generateVersion") {
binaryVersion = true
}
kotlin {
sourceSets["main"].apply {
kotlin.srcDir("src/main/kotlin")
}
}
tasks.named("compileKotlin") {
dependsOn(generateVersion)
}
plugins {
kotlin("jvm") version "1.4.21"
}
val version1 = org.jetbrains.kotlin.konan.CompilerVersion.CURRENT
println("versionV: $version1")
//val version = File("${project.buildDir}/generated/version.ser").let { file ->
// ObjectInputStream(FileInputStream(file)).use { stream ->
// return@use stream.readObject() as org.jetbrains.kotlin.konan.CompilerVersion
// }
//}
//
//println(version.toString())
kotlin {
sourceSets["main"].apply {
kotlin.srcDir("src")
//java.srcDir("src")
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-Xir")
}
}
repositories {
mavenCentral()
}
dependencies{
implementation("org.jetbrains.kotlin:kotlin-test:1.4.21")
implementation("org.jetbrains.kotlin:kotlin-util-io:1.4.21")
implementation("org.antlr:antlr4:4.9")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
implementation("com.google.code.gson:gson:2.8.6")
}