Skip to content
This repository was archived by the owner on Aug 6, 2023. It is now read-only.

Commit f787c0c

Browse files
authored
Create maven.gradle
1 parent 3d96534 commit f787c0c

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

generic/maven.gradle

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
This Gradle script provides the basic setup for uploading artifacts to the MMD Maven.
3+
While this code is specific to the MMD maven, it can be modified to fit your setup.
4+
5+
This script is set up to upload the following Jars to maven.
6+
- The main compiled jar.
7+
- The source code jar.
8+
- The JavaDoc jar.
9+
10+
Requirements!
11+
- maven-publish Gradle plugin.
12+
- https://github.com/MinecraftModDevelopment/Gradle-Collection/blob/master/generic/artifacts.gradle
13+
*/
14+
15+
publishing {
16+
17+
publications {
18+
19+
mavenJava(MavenPublication) {
20+
21+
groupId project.group
22+
artifactId project.archivesBaseName
23+
version project.version
24+
from components.java
25+
26+
// Adds the various artifacts
27+
artifact sourcesJar {
28+
29+
classifier 'sources'
30+
}
31+
32+
artifact javadocJar {
33+
34+
classifier 'javadoc'
35+
}
36+
}
37+
}
38+
39+
repositories {
40+
41+
maven {
42+
43+
credentials {
44+
45+
username System.getenv('userMaven')
46+
password System.getenv('authMaven')
47+
}
48+
49+
url System.getenv('urlMaven')
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)