mirror of
https://github.com/jlengrand/korge-samples.git
synced 2026-03-10 08:31:18 +00:00
JTransc support
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.idea
|
||||
.gradle
|
||||
build
|
||||
build
|
||||
classes
|
||||
@@ -6,6 +6,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
classpath "com.jtransc:jtransc-gradle-plugin:$jtranscVersion"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +17,7 @@ apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'signing'
|
||||
apply plugin: 'jtransc'
|
||||
|
||||
compileJava.options.encoding = 'UTF-8'
|
||||
compileTestJava.options.encoding = 'UTF-8'
|
||||
@@ -71,3 +73,4 @@ artifacts {
|
||||
|
||||
task deploy(dependsOn: ['install', 'uploadArchives']) {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
apply from: "../include.gradle"
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'application'
|
||||
|
||||
mainClassName = "com.soywiz.korge.tictactoe.TicTacToeKt"
|
||||
|
||||
dependencies {
|
||||
compile "com.soywiz:korge:$korVersion"
|
||||
compile "com.soywiz:korge-ext-swf:$korVersion"
|
||||
}
|
||||
|
||||
jtransc {
|
||||
minimizeNames = true
|
||||
treeshaking = true
|
||||
assets("resources")
|
||||
}
|
||||
8
korge-tic-tac-toe/resources/index.html
Normal file
8
korge-tic-tac-toe/resources/index.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<script src="program.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,6 +4,7 @@ import com.soywiz.korge.Korge
|
||||
import com.soywiz.korge.animate.AnLibrary
|
||||
import com.soywiz.korge.bitmapfont.BitmapFont
|
||||
import com.soywiz.korge.input.mouse
|
||||
import com.soywiz.korge.resources.Mipmaps
|
||||
import com.soywiz.korge.resources.Path
|
||||
import com.soywiz.korge.scene.Module
|
||||
import com.soywiz.korge.scene.Scene
|
||||
@@ -26,7 +27,7 @@ object TicTacToeModule : Module() {
|
||||
|
||||
// Controller
|
||||
class TicTacToeMainScene(
|
||||
@Path("main.swf") val mainLibrary: AnLibrary,
|
||||
@Mipmaps @Path("main.swf") val mainLibrary: AnLibrary,
|
||||
@Path("font/font.fnt") val font: BitmapFont
|
||||
) : Scene() {
|
||||
val board = Board(3, 3)
|
||||
|
||||
Reference in New Issue
Block a user