-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
37 lines (30 loc) · 1.22 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
//Set a default task, so if you don't provide any, these will be executed.
defaultTasks 'jar'
//Import a bunch of Java related tasks to help you
//By default production code should be in src/main/java
//Test code should be in src/test/java
//Resources to put in the jar should be in src/main/resources
//This gives you a lot of tasks predefined for java, but the most important is build
//build will compile the code, run the tests, and make the jar file.
//also used a lot is clean, which will delete all the files made by build
//also available is assemble which will compile the code but not run the test
//also available is check which will compile and run the tests
apply plugin: 'java'
apply plugin: 'application'
//set up some variables
sourceCompatibility = 1.8
version = '1.0'
mainClassName ='edu.gatech.oad.antlab.pkg1.AntLabMain'
// Resources as dependency
dependencies {
compile files('./lib/resources.jar')
}
//Define the contents of the jar file
jar {
manifest {
attributes 'Implementation-Title' : 'Gradle Quickstart' ,
'Implementation-Version' : version,
'Main-Class' : mainClassName
}
from configurations.runtime.collect { zipTree(it) } // compile jar dependencies into jar
}