-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathbuild.gradle
138 lines (126 loc) · 4.24 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
plugins {
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'java-library'
id 'maven-publish'
id 'signing'
id 'idea'
id 'eclipse'
}
javafx {
version = "22"
modules = ['javafx.controls', 'javafx.fxml', 'javafx.swing', 'javafx.web']
}
sourceCompatibility = '17'
targetCompatibility = '17'
group 'pro.gravit.launcher'
version '4.0.6'
def mainClassName = "pro.gravit.launcher.gui.JavaRuntimeModule"
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
options.incremental = true // one flag, and things will get MUCH faster
}
jar {
manifest.attributes("Module-Main-Class": mainClassName,
"Module-Config-Class": "pro.gravit.launcher.gui.config.GuiModuleConfig",
"Module-Config-Name": "JavaRuntime",
"Required-Modern-Java": "true")
jar.archiveFileName = "JavaRuntime_lmodule.jar"
}
task runDev(type: JavaExec) {
dependsOn assemble
group = "Execution"
description = "Run the main class with JavaExecTask"
classpath = sourceSets.main.runtimeClasspath
jvmArgs = ["-Dlauncherdebug.modules="+mainClassName, "-Dlauncherdebug.env=DEBUG"]
mainClass = "pro.gravit.launcher.runtime.debug.DebugMain"
}
repositories {
mavenLocal()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://maven.gravitlauncher.com"
}
mavenCentral()
}
dependencies {
implementation "pro.gravit.launcher:launcher-core:5.6.9"
implementation "pro.gravit.launcher:launcher-ws-api:5.6.9"
implementation "pro.gravit.launcher:launcher-client-api:5.6.9"
implementation "pro.gravit.launcher:launcher-client-start-api:5.6.9"
implementation "pro.gravit.launcher:launcher-client-starter-api:5.6.9"
implementation "pro.gravit.utils.enfs:enfs:2.0.1-SNAPSHOT"
implementation 'io.netty:netty-codec-http:4.1.67.Final'
implementation 'com.github.oshi:oshi-core:5.8.1'
implementation 'com.google.code.gson:gson:2.10.1'
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
defaultTasks 'build'
if (hasProperty('mavenUsername') && hasProperty('mavenPassword') && hasProperty('mavenReleaseRepository') && hasProperty('mavenSnapshotRepository')) {
publishing {
repositories {
maven {
url = version.endsWith('SNAPSHOT') ? getProperty('mavenSnapshotRepository') : getProperty('mavenReleaseRepository')
credentials {
username getProperty('mavenUsername')
password getProperty('mavenPassword')
}
}
}
}
}
publishing {
publications {
javaruntimeapi(MavenPublication) {
artifactId = 'javaruntime-api'
artifact(jar) {
classifier ""
}
artifact sourcesJar
artifact javadocJar
pom {
name = 'GravitLauncher JavaRuntime API'
description = 'GravitLauncher JavaRuntime Module API'
url = 'https://launcher.gravit.pro'
licenses {
license {
name = 'MIT'
url = 'https://mit-license.org'
}
}
developers {
developer {
id = 'gravit'
name = 'Gravit'
email = '[email protected]'
}
developer {
id = 'zaxar163'
name = 'Zaxar163'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/GravitLauncher/LauncherRuntime.git'
developerConnection = 'scm:git:ssh://[email protected]:GravitLauncher/LauncherRuntime.git'
url = 'https://launcher.gravit.pro/'
}
}
}
}
}
signing {
sign publishing.publications.javaruntimeapi
}