diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2019-08-08 21:49:32 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2019-08-08 21:49:32 +0100 |
| commit | 4265af9d6024ff47508ac41ba3655dd2aca6ce88 (patch) | |
| tree | 386b74fd4b3e9d4a7a0b45bfa924fbf101adbef2 /build.gradle | |
| parent | 461dfa758c11fe3b96d65d56578c6b4529d03988 (diff) | |
| download | terrain-4265af9d6024ff47508ac41ba3655dd2aca6ce88.tar.xz terrain-4265af9d6024ff47508ac41ba3655dd2aca6ce88.zip | |
Initial commit
Diffstat (limited to 'build.gradle')
| -rw-r--r-- | build.gradle | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..462af51 --- /dev/null +++ b/build.gradle @@ -0,0 +1,47 @@ +plugins { + id 'kotlin2js' version '1.3.21' +} + +group 'io.jamesbarnett' +version '1.0-SNAPSHOT' + +repositories { + mavenCentral() + maven { url 'https://jitpack.io' } +} + +dependencies { + compile "org.jetbrains.kotlin:kotlin-stdlib-js" + compile "com.github.markaren:three.kt:v0.88-ALPHA-7" + testImplementation "org.jetbrains.kotlin:kotlin-test-js" +} + +task assembleWeb(type: Sync) { + configurations.compile.each { File file -> + from(zipTree(file.absolutePath), { + includeEmptyDirs = false + include { fileTreeElement -> + def path = fileTreeElement.path + path.endsWith(".js") && (path.startsWith("META-INF/resources/") || + !path.startsWith("META-INF/")) + } + }) + } + + from compileKotlin2Js.destinationDir + into "${projectDir}/web/kotlin" + + dependsOn classes +} +assemble.dependsOn assembleWeb + +task copyWebResources(type: Sync) { + from "${projectDir}/src/main/resources" + into "${projectDir}/web" +} + +assembleWeb.dependsOn copyWebResources + +clean.doFirst() { + delete("${projectDir}/web") +}
\ No newline at end of file |