-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
119 lines (107 loc) · 3.52 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
* Amulet is an extension api for Java
* Copyright (c) 2021 Arcane Arts
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id "io.freefair.lombok" version "6.1.0"
id 'com.jfrog.artifactory' version '4.29.0'
}
group 'art.arcane'
version System.getenv("JFROG_VERSION") ?: '1.0.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
maven { url "https://arcanearts.jfrog.io/artifactory/archives" }
}
configurations {
testImplementation.extendsFrom annotationProcessor
}
jar {
manifest {
attributes('Contains-Sources': 'java,class')
}
}
dependencies {
annotationProcessor 'com.google.dagger:dagger-compiler:2.42'
annotationProcessor 'systems.manifold:manifold-ext:2022.1.19'
testAnnotationProcessor 'systems.manifold:manifold-ext:2022.1.19'
implementation 'com.google.dagger:dagger:2.40.1'
implementation 'org.reflections:reflections:0.10.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
implementation 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'org.apache.commons:commons-lang3:3.12.0'
api 'com.google.code.gson:gson:2.9.0'
api 'systems.manifold:manifold-rt:2022.1.19'
api 'systems.manifold:manifold-ext-rt:2022.1.19'
api 'art.arcane:BitPack:22.9.2'
api 'art.arcane:NBTSon:22.9.2'
api 'art.arcane:MultiBurst:22.9.2'
api 'art.arcane:Spatial:22.9.2'
api 'art.arcane:Chrono:22.9.10'
}
test {
useJUnitPlatform()
}
artifactory {
publish {
contextUrl = 'https://arcanearts.jfrog.io/artifactory'
repository {
repoKey = 'arcane'
username = System.getenv("JFROG_USERNAME")
password = System.getenv("JFROG_PASSWORD")
}
defaults {
publications ('mavenJava')
publishConfigs('archives', 'published')
publishBuildInfo = true
publishArtifacts = true
publishPom = true
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
url = "https://arcanearts.jfrog.io/artifactory/arcane"
}
}
}
if (JavaVersion.current() != JavaVersion.VERSION_1_8 &&
sourceSets.main.allJava.files.any { it.name == "module-info.java" }) {
tasks.withType(JavaCompile) {
// if you DO define a module-info.java file:
options.compilerArgs += ['-Xplugin:Manifold', '--module-path', it.classpath.asPath]
}
} else {
tasks.withType(JavaCompile) {
// If you DO NOT define a module-info.java file:
options.compilerArgs += ['-Xplugin:Manifold']
}
}
System.out.println("Gradle is using Java " + JavaVersion.current());