This repository was archived by the owner on Nov 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
88 lines (72 loc) · 2.18 KB
/
build.gradle
File metadata and controls
88 lines (72 loc) · 2.18 KB
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
87
88
plugins {
id 'java'
id 'org.ajoberstar.grgit' version '5.2.1'
}
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
group = project.group
version = project.version
eclipse {
classpath {
downloadSources = true
}
}
idea {
module {
downloadSources = true
}
}
repositories {
mavenCentral()
maven {
url "https://repository.atlasworld.fr/repository/maven-public/"
}
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(project.java_version))
}
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
publishing {
boolean isSnapshot = System.getenv("RELEASE") != 'true';
repositories {
maven {
name 'AtlasWorld-Repository'
def release = "https://repository.atlasworld.fr/repository/maven-private-release/"
def snapshot = "https://repository.atlasworld.fr/repository/maven-private-snapshot/"
url = isSnapshot ? snapshot : release
credentials {
username = System.getenv("AW_REPO_USERNAME")
password = System.getenv("AW_REPO_PASSWORD")
}
}
}
publications {
jar(MavenPublication) {
from components.java
def snapshot = "${project.version}-${grgit.head().id.subSequence(0, 5)}"
try {
version = isSnapshot ? snapshot : grgit.tag.list().get(0).getName();
} catch (IndexOutOfBoundsException e) {
version = "undefined"
}
pom {
name = project.name
description = project.description
licenses {
license {
name = "AtlasWorld's Proprietary License"
url = 'https://github.com/AtlasWorldMC/License/blob/main/LICENSE'
}
}
}
}
}
}
java {
withSourcesJar()
}
}