-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
92 lines (84 loc) · 2.68 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = 'dev.bitbite'
version = '2.0.2'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
maven(MavenPublication) {
from components.java
groupId = 'dev.bitbite'
artifactId = 'OpenNetLib'
version = '2.0.2'
pom {
name = 'OpenNetLib - A Java Networking Library'
description = 'OpenNetLib is a lightweight, easy-to-use library to simplify socket communication. It is written in and for Java. It\'s still in an early stage but saves a lot of time already. Start using OpenNetLib today or help improving it by posting issues, questions and feature requests here: https://github.com/bitbitedev/OpenNetLib/issues'
url = 'https://github.com/bitbitedev/OpenNetLib'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/bitbitedev/OpenNetLib/blob/master/LICENSE'
}
}
developers {
developer {
id = 'bitbite'
name = 'Bitbite Team'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/bitbitedev/OpenNetLib.git'
url = 'https://github.com/bitbitedev/OpenNetLib'
}
}
}
}
repositories {
maven {
name = "OSSRH"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotRepoUrl : releasesRepoUrl
}
}
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign publishing.publications.maven
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
// Use JUnit Jupiter for testing.
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
//lombok
compileOnly 'org.projectlombok:lombok:1.18.36'
annotationProcessor 'org.projectlombok:lombok:1.18.36'
}
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}