File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ java {
1515 toolchain {
1616 languageVersion = JavaLanguageVersion . of(17 )
1717 }
18+ withJavadocJar()
19+ withSourcesJar()
20+ }
21+
22+ sourcesJar {
23+ duplicatesStrategy(DuplicatesStrategy . EXCLUDE )
1824}
1925
2026repositories { mavenCentral() }
@@ -26,8 +32,26 @@ tasks.withType(JavaCompile).configureEach {
2632 options. compilerArgs << " -parameters"
2733}
2834
35+ tasks. publish. doFirst() {
36+ def user = System . getenv(" GITHUB_USER" )
37+ def pw = System . getenv(" GITHUB_TOKEN" )
38+ println " Publish start user:$user "
39+ }
40+
2941publishing {
3042
43+ repositories {
44+ maven {
45+ name = " GitHubPackages"
46+ url = " https://maven.pkg.github.com/reportmill/SnapKit"
47+ credentials {
48+ username = System . getenv(" GITHUB_USER" )
49+ password = System . getenv(" GITHUB_TOKEN" )
50+ println " Publish user: username=$username "
51+ }
52+ }
53+ }
54+
3155 publications {
3256 gpr(MavenPublication ) {
3357 artifactId = ' snapkit'
You can’t perform that action at this time.
0 commit comments