-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.gradle
85 lines (73 loc) · 2.09 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
apply plugin: 'java'
apply plugin: 'application'
sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// NetBeans will automatically add "run" and "debug" tasks relying on the
// "mainClass" property. You may however define the property prior executing
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
//
// Note however, that you may define your own "run" and "debug" task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
if (!hasProperty('mainClass')) {
ext.mainClass = 'Ic2ExpReactorPlanner.ReactorPlannerFrame'
}
mainClassName = ext.mainClass
sourceSets {
main {
java {
srcDirs 'src'
}
resources {
srcDir 'resources'
}
}
test {
java {
srcDir 'test'
}
resources {
srcDir 'testResources'
}
}
}
repositories {
mavenCentral()
// You may define additional repositories, or even remove "mavenCentral()".
// Read more about repositories here:
// http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:repositories
}
dependencies {
// TODO: Add dependencies here ...
// You can read more about how to add dependency here:
// http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:how_to_declare_your_dependencies
testCompile group: 'junit', name: 'junit', version: '4.10'
}
jar {
from('src') {
include 'assets/**/*.png'
include 'Ic2ExpReactorPlanner/Bundle*.properties'
}
manifest {
attributes 'Main-Class': 'Ic2ExpReactorPlanner.ReactorPlannerFrame'
}
}
task processAssets(type: Copy) {
from('src') {
include 'assets/**/*.png'
include 'Ic2ExpReactorPlanner/Bundle*.properties'
}
into 'build/classes/java/main'
}
run {
run.dependsOn processAssets
}
task processSource(type: Copy) {
from sourceSets.main.java
inputs.property 'erpVersion', erpVersion
filter { line -> line.replaceAll('@VERSION@', erpVersion) }
into "$buildDir/src"
}
compileJava {
source = processSource.outputs
}