-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (77 loc) · 2.53 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
80
81
82
83
84
85
86
plugins {
id 'net.minecraftforge.gradleutils' version '2.+'
id 'com.github.ben-manes.versions' version '0.39.0'
id 'org.javamodularity.moduleplugin' version '1.8.10'
id 'java-library'
id 'maven-publish'
id 'eclipse'
}
group 'org.mcmodlauncher'
version = gradleutils.getTagOffsetVersion()
logger.lifecycle("Version: $version")
repositories {
mavenLocal()
maven {
name 'forge'
url 'https://maven.minecraftforge.net/'
}
}
dependencies {
implementation('cpw.mods:modlauncher:9.0.+')
implementation('org.apache.logging.log4j:log4j-core:2.17.1')
annotationProcessor('org.apache.logging.log4j:log4j-core:2.17.1')
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(16)
withSourcesJar()
}
changelog {
fromTag('0.1')
}
jar {
//noinspection UnnecessaryQualifiedReference
manifest.attributes(
'Specification-Title': 'modlog4j',
'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}+${gradleutils.gitInfo.branch}.${gradleutils.gitInfo.abbreviatedId}",
'Implementation-Vendor': 'forge',
'Implementation-Timestamp': java.time.Instant.now().toString(),
'Git-Commit': gradleutils.gitInfo.abbreviatedId,
'Git-Branch': gradleutils.gitInfo.branch,
'Build-Number': "${System.getenv("BUILD_NUMBER") ?: 0}",
)
}
artifacts {
archives jar
archives sourcesJar
}
publishing {
publications.register('mavenJava', MavenPublication) {
from components.java
pom {
name = 'Mod Log4J helper'
description = 'Log4J plugin to help format extended stacktraces'
url = 'https://github.com/McModLauncher/modlog4j'
scm {
url = 'https://github.com/McModLauncher/modlog4j'
connection = 'scm:git:[email protected]:McModLauncher/modlog4j.git'
developerConnection = 'scm:git:[email protected]:McModLauncher/modlog4j.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/McModLauncher/modlog4j/issues'
}
developers {
developer {
id = 'cpw'
name = 'cpw'
}
}
}
}
repositories {
maven gradleutils.getPublishingForgeMaven()
}
}