-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
55 lines (45 loc) · 1.64 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
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'java'
}
// See settings.gradle for the project's name
// This is often your domain name (reversed.)
group 'com.yourorganization'
// The version of this project. SNAPSHOT means "we're still working on it"
version '1.0-SNAPSHOT'
// Tell Gradle we want to use Java 8
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Resolve dependencies and plugins using maven central repository.
repositories {
mavenCentral()
}
// Gradle dependencies can also sourced from maven central, using the same coordinates (group/name/version).
dependencies {
implementation group: 'com.github.javaparser', name: 'javaparser-core', version: '3.23.1'
testCompile group: 'junit', name: 'junit', version: '4.13.2'
}
// Create a single jar, including all dependencies -- Output to /build/libs/
// Documentation available at https://github.com/johnrengelman/shadow
// run this using: gradle shadowJar
shadowJar {
archiveBaseName.set(project.name + '-shadow')
archiveClassifier.set('beta')
archiveVersion.set(project.version)
manifest {
inheritFrom project.tasks.jar.manifest
}
}
// Default jar settings
// (note that jar won't include dependencies - either add them to the class path, or bulid a shadow / fat jar)
// run this using: gradle jar
jar {
manifest {
attributes 'Implementation-Title': 'JavaParser Gradle Jar Example',
'Implementation-Version': version,
'Main-Class': 'com.yourorganization.maven_sample.LogicPositivizer'
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}