Skip to content

Commit c52c625

Browse files
committed
Add publishing
1 parent 356b36a commit c52c625

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

build.gradle

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
plugins {
1010
// Apply the java-library plugin to add support for Java Library
1111
id 'java-library'
12+
id 'maven-publish'
1213
}
1314

1415
repositories {
@@ -29,3 +30,35 @@ dependencies {
2930
// Use JUnit test framework
3031
testImplementation 'junit:junit:4.12'
3132
}
33+
34+
publishing {
35+
repositories {
36+
maven {
37+
name = "github"
38+
url = 'https://maven.pkg.github.com/MuShare/PlutoJavaServerSDK'
39+
credentials {
40+
username = System.getenv("GITHUB_ACTOR")
41+
password = System.getenv("GITHUB_TOKEN")
42+
}
43+
}
44+
}
45+
46+
publications {
47+
maven(MavenPublication) {
48+
version '0.1'
49+
50+
pom {
51+
url 'https://github.com/MuShare/PlutoJavaServerSDK'
52+
licenses {
53+
license {
54+
name = 'MIT'
55+
}
56+
}
57+
}
58+
59+
from components.java
60+
artifact sourcesJar
61+
artifact javadocJar
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)