-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
119 lines (99 loc) · 2.98 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version = '0.2.2-SNAPSHOT'
buildscript {
repositories {
mavenLocal()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.openjfx:javafx-plugin:0.0.10")
}
}
['java', 'distribution', 'maven'].each {
apply plugin: it
}
import org.gradle.util.VersionNumber
apply plugin: "org.openjfx.javafxplugin"
String binedVersion = '0.2.1-SNAPSHOT';
sourceCompatibility = '11'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
doFirst {
options.fork = true
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
if (VersionNumber.parse(gradle.gradleVersion) >= VersionNumber.parse('5.0')) {
options.bootstrapClasspath = files("${System.properties['java.home']}/lib/rt.jar", "$File.pathSeparator${System.properties['java.home']}/jre/lib/jsse.jar")
} else {
options.bootClasspath = "${System.properties['java.home']}/lib/rt.jar"
options.bootClasspath += "$File.pathSeparator${System.properties['java.home']}/jre/lib/jsse.jar"
}
}
}
}
// Disable tests on build
if (!gradle.startParameter.taskNames.any {it.endsWith("test")}) {
tasks.withType(Test) {enabled = false}
}
task testJar(type: Jar, dependsOn: testClasses) {
archiveClassifier = 'tests'
archiveBaseName = "test-${project.archivesBaseName}"
from sourceSets.test.output
}
configurations {
tests
}
artifacts {
tests testJar
}
task sourceJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.java
}
javadoc {
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
options.addBooleanOption('html5', true)
}
}
task javadocJar (type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
if (!hasProperty('mainClass')) {
ext.mainClass = 'org.exbin.bined.bluej.BinEdExtension'
}
repositories {
mavenCentral()
flatDir {
dirs "lib"
}
}
javafx {
version = "11"
modules = [ 'javafx.controls', 'javafx.graphics' ]
}
dependencies {
compile ':bluejext2'
compile ":bined-core-${binedVersion}"
compile ":bined-extended-${binedVersion}"
compile ":bined-highlight-swing-${binedVersion}"
compile ":bined-operation-${binedVersion}"
compile ":bined-operation-swing-${binedVersion}"
compile ":bined-swing-${binedVersion}"
compile ":bined-swing-extended-${binedVersion}"
compile ":paged_data-0.2.1-SNAPSHOT"
compile ":paged_data-delta-0.2.1-SNAPSHOT"
compile ':jsr305-3.0.2'
testCompile group : 'junit', name: 'junit', version: '4.13.2'
}
jar {
manifest {
attributes(
'Main-Class': mainClass
)
}
from configurations.compile.findAll { it.name != 'bluejext.jar' }.collect { it.isDirectory() ? it : zipTree(it) }
destinationDir = file("$buildDir")
}