|
1 | 1 | apply plugin: 'java-library' |
2 | 2 | apply plugin: 'maven-publish' |
| 3 | +apply plugin: 'signing' |
| 4 | + |
| 5 | +java { |
| 6 | + withJavadocJar() |
| 7 | + withSourcesJar() |
| 8 | +} |
3 | 9 |
|
4 | 10 | publishing { |
5 | 11 | publications { |
6 | 12 | mavenJava(MavenPublication) { |
| 13 | + artifactId = 'spring-core' |
7 | 14 | from components.java |
| 15 | + pom { |
| 16 | + name = 'Bitweb Java Core Library' |
| 17 | + description = 'Bitweb Spring Boot Java Core Library' |
| 18 | + url = 'https://github.com/BitWeb/java-core-lib' |
| 19 | + //properties = [] |
| 20 | + licenses { |
| 21 | + license { |
| 22 | + name = 'MIT License' |
| 23 | + url = 'https://github.com/BitWeb/java-core-lib/blob/main/LICENSE' |
| 24 | + } |
| 25 | + } |
| 26 | + developers { |
| 27 | + developer { |
| 28 | + id = 'erichjag' |
| 29 | + name = 'Erich Jagomägis' |
| 30 | + email = 'erich@bitweb.ee' |
| 31 | + } |
| 32 | + } |
| 33 | + scm { |
| 34 | + connection = 'scm:https://github.com/BitWeb/java-core-lib.git' |
| 35 | + developerConnection = 'scm:git@github.com:BitWeb/java-core-lib.git' |
| 36 | + url = 'https://github.com/BitWeb/java-core-lib' |
| 37 | + } |
| 38 | + } |
8 | 39 | } |
9 | 40 | } |
10 | 41 | repositories { |
11 | 42 | maven { |
12 | | - def releasesRepoUrl = "https://nexus.bitweb.ee/repository/maven-public/" |
13 | | - def snapshotsRepoUrl = "https://nexus.bitweb.ee/repository/maven-snapshot/" |
14 | | - |
15 | | - name 'nexus' |
16 | | - url = project.version.contains('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl |
| 43 | + def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' |
| 44 | + def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/' |
| 45 | + url = version.contains('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl |
17 | 46 | credentials { |
18 | | - username = project.repoUser |
19 | | - password = project.repoPassword |
| 47 | + username = project.mavenCentralUsername |
| 48 | + password = project.mavenCentralPassword |
20 | 49 | } |
21 | 50 | } |
22 | 51 | } |
23 | 52 | } |
24 | 53 |
|
| 54 | +signing { |
| 55 | + sign publishing.publications.mavenJava |
| 56 | +} |
| 57 | + |
| 58 | +javadoc { |
| 59 | + if(JavaVersion.current().isJava9Compatible()) { |
| 60 | + options.addBooleanOption('html5', true) |
| 61 | + } |
| 62 | +} |
| 63 | + |
25 | 64 | jar { |
26 | 65 | from sourceSets.main.allSource |
27 | 66 | } |
0 commit comments