11plugins {
22 id " java"
3- id " maven-publish"
4- id " signing"
53}
64
75java. toolchain. languageVersion = JavaLanguageVersion . of(8 )
@@ -11,157 +9,19 @@ archivesBaseName = project.maven_name
119group = project. maven_group
1210version = project. maven_version
1311
14- configurations {
15- include
16-
17- implementation. extendsFrom include
18- api. extendsFrom include
19- }
20-
2112repositories {
13+ mavenLocal()
2214 mavenCentral()
2315 maven {
2416 name = " lenni0451 releases"
2517 url = " https://maven.lenni0451.net/releases"
2618 }
27- // maven {
28- // name = "Sonatype Snapshots"
29- // url "https://oss.sonatype.org/content/repositories/snapshots/"
30- // }
31-
32- // ivy { //include "waterfall:1.19:504@jar"
33- // url "https://papermc.io/api/v2/projects"
34- // patternLayout {
35- // artifact "/[organisation]/versions/[module]/builds/[revision]/downloads/[organisation]-[module]-[revision].[ext]"
36- // }
37- // metadataSources {
38- // artifact()
39- // }
40- // }
41- }
42-
43- dependencies {
44- if (new File (projectDir, " libs" ). exists()) {
45- include fileTree(include : [" *.jar" ], dir : " libs" )
46- }
47-
48- implementation " com.google.code.findbugs:jsr305:3.0.2"
49- // include "net.lenni0451:Reflect:1.0.0"
50- }
51-
52- java {
53- withSourcesJar()
54- withJavadocJar()
55- }
56-
57- processResources {
58- // Config file: "version: ${version}"
59- inputs. properties(
60- " version" : project. maven_version
61- )
62-
63- filesMatching(" config" ) {
64- expand(
65- " version" : project. maven_version
66- )
67- }
68- }
69-
70- artifacts {
71- archives javadocJar, sourcesJar
72- }
73-
74- jar {
75- dependsOn configurations. include
76- from {
77- duplicatesStrategy = DuplicatesStrategy . EXCLUDE
78- configurations. include. collect {
79- zipTree(it)
80- }
81- } {
82- exclude " META-INF/*.RSA" , " META-INF/*.SF" , " META-INF/*.DSA"
83- }
84-
85- manifest {
86- attributes(
87- " Main-Class" : " net.lenni0451.gradletemplate.Main" ,
88- " Multi-Release" : " true"
89- )
90- }
91- }
92-
93- test {
94- useJUnitPlatform()
95- testLogging {
96- events " passed" , " skipped" , " failed"
97- }
98- maxParallelForks Runtime . runtime. availableProcessors()
99- }
100-
101- publishing {
102- repositories {
103- maven {
104- name = " reposilite"
105- def releasesUrl = " https://maven.lenni0451.net/releases"
106- def snapshotsUrl = " https://maven.lenni0451.net/snapshots"
107- url = project. maven_version. endsWith(" SNAPSHOT" ) ? snapshotsUrl : releasesUrl
108-
109- credentials(PasswordCredentials )
110- authentication {
111- basic(BasicAuthentication )
112- }
113- }
114- maven {
115- name = " ossrh"
116- def releasesUrl = " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
117- def snapshotsUrl = " https://s01.oss.sonatype.org/content/repositories/snapshots/"
118- url = project. maven_version. endsWith(" SNAPSHOT" ) ? snapshotsUrl : releasesUrl
119-
120- credentials(PasswordCredentials )
121- authentication {
122- basic(BasicAuthentication )
123- }
124- }
125- }
126- publications {
127- maven(MavenPublication ) {
128- artifactId = project. maven_name
129- groupId = project. maven_group
130- version = project. maven_version
131-
132- from components. java
133-
134- pom {
135- name = rootProject. name
136- description = " A template for gradle projects"
137- url = " https://github.com/Lenni0451/GradleTemplate"
138- licenses {
139- license {
140- name = " MIT License"
141- url = " https://github.com/Lenni0451/GradleTemplate/blob/main/LICENSE"
142- }
143- }
144- developers {
145- developer {
146- id = " Lenni0451"
147- }
148- }
149- scm {
150- connection = " scm:git:git://github.com/Lenni0451/GradleTemplate.git"
151- developerConnection = " scm:git:ssh://github.com/Lenni0451/GradleTemplate.git"
152- url = " github.com/Lenni0451/GradleTemplate"
153- }
154- }
155- }
19+ maven {
20+ name = " ViaVersion"
21+ url " https://repo.viaversion.com"
15622 }
15723}
15824
159- signing {
160- sign configurations. archives
161- sign publishing. publications. maven
162- }
163-
164- project. tasks. withType(PublishToMavenRepository ). forEach {
165- it. dependsOn(project. tasks. withType(Sign ))
25+ dependencies {
26+ compileOnly " net.raphimc:ViaProxy:3.0.14"
16627}
167- build. dependsOn(test)
0 commit comments