File tree Expand file tree Collapse file tree 3 files changed +63
-4
lines changed
Expand file tree Collapse file tree 3 files changed +63
-4
lines changed Original file line number Diff line number Diff line change 1- apply plugin : ' java'
1+ plugins {
2+ id ' java'
3+ id ' maven-publish'
4+ id ' signing'
5+ }
6+
7+ group = ' hu.ssh'
8+ version = ' 0.1.0'
29
310compileJava. options. encoding = ' UTF-8'
411
@@ -17,10 +24,60 @@ test {
1724 }
1825}
1926
20- uploadArchives {
27+ java {
28+ withJavadocJar()
29+ withSourcesJar()
30+ }
31+
32+ publishing {
2133 repositories {
22- flatDir {
23- dirs ' repos'
34+ maven {
35+ def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2"
36+ def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots"
37+ url = version. endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
38+ credentials {
39+ username = System . getenv(" NEXUS_USER" )
40+ password = System . getenv(" NEXUS_PASSWORD" )
41+ }
2442 }
2543 }
44+ publications {
45+ maven(MavenPublication ) {
46+ from components. java
47+
48+ pom {
49+ name = " $groupId :$artifactId "
50+ description = ' A simple console progressbar for Java'
51+ url = ' https://github.com/raszi/java-progressbar'
52+ licenses {
53+ license {
54+ name = ' MIT License'
55+ url = ' https://opensource.org/licenses/MIT'
56+ distribution = ' repo'
57+ }
58+ }
59+ developers {
60+ developer {
61+ id = ' raszi'
62+ name = ' Istvan Karaszi'
63+ 64+ url = ' https://github.com/raszi'
65+ }
66+ }
67+ scm {
68+ connection = ' scm:git:git://github.com/raszi/java-progressbar.git'
69+ developerConnection = ' scm:git:ssh://github.com/raszi/java-progressbar.git'
70+ url = ' https://github.com/raszi/java-progressbar'
71+ }
72+ }
73+ }
74+ }
75+ }
76+
77+ signing {
78+ sign publishing. publications. maven
79+ def signingKeyId = findProperty(" signingKeyId" )
80+ def signingKey = findProperty(" signingKey" )
81+ def signingPassword = findProperty(" signingPassword" )
82+ useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
2683}
Original file line number Diff line number Diff line change 1+ org.gradle.internal.publish.checksums.insecure =true
Original file line number Diff line number Diff line change 1+ rootProject. name = ' java-progressbar'
You can’t perform that action at this time.
0 commit comments