@@ -8,16 +8,26 @@ allprojects {
88 repositories {
99 mavenCentral()
1010 }
11+
12+ group = ' io.github.loom'
13+ version = artifactVersion
1114}
1215
1316subprojects {
1417 apply plugin : ' java'
1518 apply plugin : ' org.ec4j.editorconfig'
1619 apply plugin : ' checkstyle'
20+ apply plugin : ' maven-publish'
21+ apply plugin : ' signing'
1722
1823 sourceCompatibility = JavaVersion . VERSION_1_8
1924 targetCompatibility = JavaVersion . VERSION_1_8
2025
26+ java {
27+ withJavadocJar()
28+ withSourcesJar()
29+ }
30+
2131 editorconfig {
2232 excludes = [" build" ]
2333 }
@@ -37,4 +47,67 @@ subprojects {
3747 maxErrors = 0
3848 maxWarnings = 0
3949 }
50+
51+ jar {
52+ manifest {
53+ attributes(
54+ ' Specification-Title' : artifactName,
55+ ' Specification-Version' : artifactVersion,
56+ ' Specification-Vendor' : ' io.github.loom' ,
57+ ' Implementation-Title' : artifactName,
58+ ' Implementation-Version' : artifactVersion,
59+ ' Implementation-Vendor' : ' io.github.loom'
60+ )
61+ }
62+ }
63+
64+ publishing {
65+ repositories {
66+ maven {
67+ name " OSSRH"
68+ url " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
69+ credentials {
70+ username System . getenv(" MAVEN_USERNAME" )
71+ password System . getenv(" MAVEN_PASSWORD" )
72+ }
73+ }
74+ }
75+
76+ publications {
77+ maven(MavenPublication ) {
78+ artifactId artifactId
79+ from components. java
80+ pom {
81+ name = artifactName
82+ description = artifactDescription
83+ url = " https://github.com/loom/loom-java"
84+ licenses {
85+ license {
86+ name = " MIT License"
87+ url = " https://github.com/loom/loom-java/blob/main/LICENSE"
88+ }
89+ }
90+ developers {
91+ developer {
92+ id = " gyuwon"
93+ name = " Gyuwon Yi"
94+ email = " gyuwon@live.com"
95+ }
96+ }
97+ scm {
98+ connection = " https://github.com/loom/loom-java.git"
99+ developerConnection = " https://github.com/loom/loom-java.git"
100+ url = " https://github.com/loom/loom-java"
101+ }
102+ }
103+ }
104+ }
105+ }
106+
107+ signing {
108+ def signingKey = System . getenv(" SIGNING_KEY" )
109+ def signingPassword = System . getenv(" SIGNING_PASSWORD" )
110+ useInMemoryPgpKeys(signingKey, signingPassword)
111+ sign publishing. publications. maven
112+ }
40113}
0 commit comments