-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
59 lines (51 loc) · 1.55 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
plugins {
id 'java'
id 'idea'
id 'maven-publish'
}
base {
archivesName = id
libsDirectory = new File("buildjars/");
}
java {
withSourcesJar()
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
}
println("Gradle Java: ${JavaVersion.current()}")
println("Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}, Encoding: ${System.getProperty "file.encoding"}")
repositories {
google()
mavenCentral()
}
dependencies {
compileOnly "org.apache.logging.log4j:log4j-api:$log4j_version"
compileOnly "org.apache.logging.log4j:log4j-core:$log4jcore_version"
compileOnly "org.apache.commons:commons-lang3:$commonslang3_version"
}
jar {
duplicatesStrategy = DuplicatesStrategy.WARN
manifest {
attributes "Specification-Title" : id
attributes "Specification-Vendor" : authors
attributes "Specification-Version" : version
attributes "Implementation-Title" : brandname
attributes "Implementation-Version" : version
attributes "Implementation-Vendor" : authors
attributes "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
}
}
publishing {
tasks.publish {
dependsOn(tasks.build)
}
publications {
register('mavenJava', MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/publications"
}
}
}