group 'perses.games' version '1.0.0-SNAPSHOT' apply plugin: 'kotlin2js' apply plugin: 'kotlin-dce-js' apply plugin: 'idea' repositories { mavenCentral() maven { url "http://nexus.astraeus.nl/nexus/content/groups/public" } } buildscript { ext.kotlin_version = '1.2.31' repositories { maven { url "http://nexus.astraeus.nl/nexus/content/groups/public" } mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } dependencies { compile "perses.games:kudens:1.1.7-SNAPSHOT" } task jarSources(type:Jar){ from sourceSets.main.allSource classifier = 'source' } artifacts { compile jarSources } compileKotlin2Js { kotlinOptions.metaInfo = true compileKotlin2Js.kotlinOptions.sourceMap = true compileKotlin2Js.kotlinOptions.suppressWarnings = true compileKotlin2Js.kotlinOptions.verbose = true } runDceKotlinJs.doLast { copy { from("build/kotlin-js-min/main") into("web/js/generated") } } def outDir = "${buildDir}/kotlin2js/main/" def webDir = "${projectDir}/web/" jar { from sourceSets.main.allSource include "**/*.kt" from outDir include "**/*.js" manifest { attributes( "Kotlin-JS-Module-Name": "test-library" ) } } jar.dependsOn(runDceKotlinJs)