81 lines
2.3 KiB
Groovy
81 lines
2.3 KiB
Groovy
buildscript {
|
|
ext.rootBuildDirectory = file('../..')
|
|
|
|
ext {
|
|
def properties = new java.util.Properties()
|
|
properties.load(new java.io.FileReader(project.file("$rootBuildDirectory/../gradle.properties")))
|
|
properties.each { k, v->
|
|
def key = k as String
|
|
def value = project.findProperty(key) ?: v
|
|
project.logger.info("${project.name} $key: $value")
|
|
set(key, value)
|
|
}
|
|
}
|
|
|
|
ext["withoutEmbedabble"] = true
|
|
MiscKt.kotlinInit(project, findProperty("cacheRedirectorEnabled")?.toString()?.toBoolean() ?: false)
|
|
ext["bootstrapKotlinRepo"] = BootstrapKt.getBootstrapKotlinRepo(project)
|
|
ext["bootstrapKotlinVersion"] = BootstrapKt.getBootstrapKotlinVersion(project)
|
|
ext["kotlinVersion"] = project.bootstrapKotlinVersion
|
|
|
|
apply from: "$rootBuildDirectory/gradle/loadRootProperties.gradle"
|
|
apply from: "$rootBuildDirectory/gradle/kotlinGradlePlugin.gradle"
|
|
|
|
repositories {
|
|
maven {
|
|
url 'https://cache-redirector.jetbrains.com/jcenter'
|
|
}
|
|
jcenter()
|
|
maven {
|
|
url project.bootstrapKotlinRepo
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
}
|
|
}
|
|
|
|
apply plugin: 'kotlin-multiplatform'
|
|
|
|
repositories {
|
|
maven {
|
|
url 'https://cache-redirector.jetbrains.com/jcenter'
|
|
}
|
|
maven {
|
|
url project.bootstrapKotlinRepo
|
|
}
|
|
jcenter()
|
|
}
|
|
|
|
kotlin {
|
|
sourceSets {
|
|
commonMain {
|
|
dependencies {
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
|
|
}
|
|
kotlin.srcDir '../benchmarks/shared/src'
|
|
}
|
|
jsMain {
|
|
dependencies {
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion"
|
|
implementation(npm("aws-sdk", "~2.670.0"))
|
|
}
|
|
kotlin.srcDir 'src/main/kotlin'
|
|
kotlin.srcDir 'src/main/kotlin-js'
|
|
kotlin.srcDir 'shared/src/main/kotlin'
|
|
}
|
|
}
|
|
|
|
targets {
|
|
fromPreset(presets.js, 'js') {
|
|
nodejs()
|
|
compilations.main.kotlinOptions {
|
|
outputFile = "${projectDir}/server/app.js"
|
|
moduleKind = "commonjs"
|
|
sourceMap = true
|
|
}
|
|
}
|
|
}
|
|
}
|