-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
118 lines (100 loc) · 2.86 KB
/
build.gradle
File metadata and controls
118 lines (100 loc) · 2.86 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
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
plugins {
id 'java'
id 'application'
id 'com.gradleup.shadow' version '8.3.0'
id 'maven-publish'
}
application {
mainClass = 'io.nodelink.client.NodeLink'
}
task generateVersionClass {
doLast {
def versionFile = file("$buildDir/generated/source/version/io/nodelink/client/update/Version.java")
versionFile.parentFile.mkdirs()
versionFile.text = """
package io.nodelink.client.update;
public class Version {
public static final String VERSION = "${project.version}";
}
"""
}
}
compileJava.dependsOn generateVersionClass
sourceSets.main.java.srcDir "$buildDir/generated/source/version"
tasks.register('printVersion') {
doLast {
println project.version
}
}
shadowJar {
archiveClassifier.set('fat')
manifest {
attributes 'Main-Class': 'io.nodelink.client.NodeLink'
}
}
group = 'io.nodelink.client'
version = '0.1.0'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.jline:jline:3.30.0'
implementation 'io.projectreactor:reactor-core:3.8.1'
}
tasks.jar {
manifest {
attributes 'Main-Class': 'io.nodelink.client.NodeLink'
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.test {
useJUnitPlatform()
}
test {
useJUnitPlatform()
}
java {
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = project.group.toString()
artifactId = 'NodeLink-Client'
version = project.version.toString()
pom {
name = 'NodeLink-Client'
description = 'Change later'
url = 'https://nodelink-project.github.io/NodeLink-Client/'
licenses {
license {
name = 'GPL-3.0'
url = 'https://raw.githubusercontent.com/NodeLink-Project/NodeLink-Client/refs/heads/main/LICENSE'
}
}
developers {
developer {
id = 'sandro642'
name = 'Sandro'
email = 'sandro33810@gmail.com'
}
}
scm {
connection = 'scm:git:git://github.com/NodeLink-Project/NodeLink-Client.git'
developerConnection = 'scm:git:ssh://github.com/NodeLink-Project/NodeLink-Client.git'
url = 'https://github.com/NodeLink-Project/NodeLink-Client'
}
}
}
}
repositories {
maven {
name = 'LocalRepo'
url = uri(layout.buildDirectory.dir('repo'))
}
}
}