This repository was archived by the owner on Sep 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (62 loc) · 1.44 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
plugins {
id 'java'
id 'maven-publish'
// id 'maven'
}
targetCompatibility = sourceCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.main_name
version = project.main_version
group = project.main_group
repositories {
maven { url "https://libraries.minecraft.net/" }
mavenCentral()
}
def asmVersion = '9.2'
dependencies {
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
// implementation 'org.ow2.asm:asm-debug-all:5.0.3'
// implementation 'org.lwjgl.lwjgl:lwjgl:2.9.1'
implementation 'org.apache.logging.log4j:log4j-core:2.17.0'
implementation 'org.apache.logging.log4j:log4j-api:2.17.0'
}
/*
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
*/
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
artifacts {
archives jar
archives sourcesJar
}
publishing {
repositories {
maven {
// url "${projectDir}/build"
url "$buildDir/maven"
}
}
/*
repositories {
def ENV = System.getenv()
if (ENV.MAVEN_URL) {
maven {
url ENV.MAVEN_URL
}
}
}
*/
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
artifact sourcesJar
}
}
}