Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 64 lines (50 sloc) 1.39 KB
group 'org.ice1000'
version '1.0'
apply plugin: 'java'
apply plugin: 'application'
buildscript {
ext.kotlin_version = '1.2.60'
ext.frice_version = '1.8.5'
ext.lice_version = '3.3.2'
repositories { mavenCentral() }
}
mainClassName = 'org.frice.th.Touhou'
def useLocalFriceEngine = false
repositories {
mavenCentral()
if (useLocalFriceEngine) flatDir { dirs '../FriceEngine/build/libs' }
}
sourceSets {
main.java.srcDirs = ['src']
test.java.srcDirs = ['test']
main.resources.srcDirs = ['res']
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.setDeprecation true
}
repositories { jcenter() }
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile group: 'org.jetbrains', name: 'annotations', version: '16.0.1'
if (useLocalFriceEngine) compile name: "engine-$frice_version"
else compile "org.frice:engine:$frice_version"
compile "org.lice:lice:$lice_version"
testCompile group: 'junit', name: 'junit', version: '4.12'
}
jar {
baseName = 'game'
manifest { attributes 'Main-Class': mainClassName }
}
task fatJar(type: Jar) {
baseName = 'game-exe'
description 'Assembles a jar archive containing the main classes and all the dependencies.'
group 'build'
manifest { attributes 'Main-Class': mainClassName }
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
artifacts {
archives fatJar
archives jar
}