-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
105 lines (92 loc) · 2.85 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
plugins {
id "java"
id "maven-publish"
id "signing"
}
base {
group = project.maven_group
archivesName = project.maven_name
version = project.maven_version
description = project.maven_description
}
repositories {
mavenCentral()
}
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
// Rename the project's license file to LICENSE_<project_name> to avoid conflicts
from("LICENSE") {
rename {
"${it}_${project.archivesBaseName}"
}
}
}
publishing {
repositories {
maven {
name = "reposilite"
url = "https://maven.lenni0451.net/" + (project.version.endsWith("SNAPSHOT") ? "snapshots" : "releases")
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
maven {
name = "ossrh"
def releasesUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = project.version.endsWith("SNAPSHOT") ? snapshotsUrl : releasesUrl
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = project.archivesBaseName
version = project.version
from components.java
pom {
name = artifactId
description = project.description
url = "https://github.com/FlorianMichael/Brainfuck4J"
licenses {
license {
name = "Apache-2.0 license"
url = "https://github.com/FlorianMichael/Brainfuck4J/blob/main/LICENSE"
}
}
developers {
developer {
id = "FlorianMichael"
name = "EnZaXD"
email = "florian.michael07@gmail.com"
}
}
scm {
connection = "scm:git:git://github.com/FlorianMichael/Brainfuck4J.git"
developerConnection = "scm:git:ssh://github.com/FlorianMichael/Brainfuck4J.git"
url = "github.com/FlorianMichael/Brainfuck4J"
}
}
}
}
}
signing {
setRequired false
sign configurations.archives
sign publishing.publications.maven
}
project.tasks.withType(PublishToMavenRepository).forEach {
it.dependsOn(project.tasks.withType(Sign))
}