-
Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathbuild.gradle
50 lines (41 loc) · 1.18 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
description 'Java Swing Tips'
allprojects {
apply {
plugin 'java'
plugin 'application'
}
apply from: "$rootDir/checkstyle.gradle"
apply from: "$rootDir/pmd.gradle"
repositories {
mavenCentral()
}
def defaultEncoding = 'UTF-8'
[compileJava, compileTestJava]*.options*.encoding = defaultEncoding
}
subprojects {
sourceSets {
main {
java { srcDir 'src/java' }
resources { srcDir 'src/java' }
}
}
ext.config = new ConfigSlurper().parse(new File("${project.projectDir}/config.gradle").toURL())
mainClassName = config.main.class
// In this section you declare where to find the dependencies of your project
repositories {
flatDir { dirs "${project.projectDir}/lib" }
}
// In this section you declare the dependencies for your production and test code
dependencies {
implementation fileTree(dir: "${project.projectDir}/lib", include: '*.jar')
}
version = config.version
jar {
manifest {
attributes 'Implementation-Version': config.version,
'Implementation-Vendor': config.vendor,
'Main-Class': config.main.class,
'Class-Path': config.runtime.classpath
}
}
}