forked from cpw/grossjava9hacks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
79 lines (66 loc) · 2.1 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
plugins {
id 'org.ajoberstar.grgit' version '4.1.0'
id 'com.github.ben-manes.versions' version '0.38.0'
}
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'eclipse'
repositories {
mavenCentral()
}
task install(dependsOn: [publishToMavenLocal])
test {
useJUnitPlatform()
}
group = 'cpw.mods'
version = "2.0.9"
dependencies {
implementation("org.apache.logging.log4j:log4j-api:2.14.1")
implementation("org.apache.logging.log4j:log4j-core:2.14.1")
testImplementation("org.powermock:powermock-core:2.0.+")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.+")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.7.+")
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked'
}
jar {
manifest {
attributes([
'Specification-Title': 'grossjava9hacks',
'Specification-Vendor': 'forge',
'Specification-Version': '1', // We are version 1 of ourselves
'Implementation-Title': project.name,
'Implementation-Version': "${project.version}+${System.getenv("BUILD_NUMBER")?:0}+${grgit.branch.current().getName()}.${grgit.head().abbreviatedId}",
'Implementation-Vendor':'forge',
'Implementation-Timestamp': java.time.Instant.now().toString(),
'Git-Commit': grgit.head().abbreviatedId,
'Git-Branch': grgit.branch.current().getName(),
'Build-Number': "${System.getenv("BUILD_NUMBER")?:0}",
])
}
}
artifacts {
archives jar
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
credentials {
username System.getProperty("MAVEN_USER")?:'ci'
password System.getProperty("MAVEN_PASSWORD")?:'password'
}
url "https://repo.conduit.systems/repository/releases/"
}
}
}