Skip to content

Commit fcc6176

Browse files
Move to maven central.
1 parent 67f0f89 commit fcc6176

File tree

7 files changed

+67
-33
lines changed

7 files changed

+67
-33
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ jobs:
4747
- name: Publish to maven
4848
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
4949
run: |
50-
./gradlew publish
50+
./gradlew publishAllPublicationsToMavenCentralRepository
5151
env:
52-
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
53-
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
54-
MAVEN_PUBLISH_REGISTRY_URL: "https://s01.oss.sonatype.org/content/repositories/releases/"
52+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
53+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
54+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
55+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ build
2626
local.properties
2727

2828
# OpenAPI Generator creates a copy for whatver reason
29-
/api
29+
/api
30+
31+
# Publish Test with potential secrets
32+
test-publish.ps1

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Qaisar Ahmad & Sebastian Stehle
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

build.gradle

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
13
plugins {
24
id 'java-library'
35
id 'maven-publish'
46
id 'com.diffplug.spotless' version '6.11.0'
7+
id "com.vanniktech.maven.publish" version "0.29.0"
58
}
69

710
repositories {
811
mavenCentral()
9-
maven {
10-
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
11-
}
1212
}
1313

1414
dependencies {
@@ -31,11 +31,6 @@ spotless {
3131
}
3232
}
3333

34-
java {
35-
withSourcesJar()
36-
withJavadocJar()
37-
}
38-
3934
javadoc {
4035
options.tags = ["http.response.details:a:Http Response Details"]
4136

@@ -51,23 +46,35 @@ test {
5146
}
5247
}
5348

54-
publishing {
55-
publications {
56-
maven(MavenPublication) {
57-
groupId = 'io.squidex'
58-
artifactId = 'squidex'
59-
version = '2.0.0-rc1'
60-
from components.java
61-
}
49+
mavenPublishing {
50+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
51+
52+
coordinates("io.squidex", "squidex", "2.0.0-RC1")
53+
54+
pom {
55+
name = "Squidex SDK"
56+
description = "Client Library for the Squidex API"
57+
inceptionYear = "2020"
58+
url = "https://github.com/squidex/sdk-java"
59+
licenses {
60+
license {
61+
name = "MIT"
62+
}
6263
}
63-
repositories {
64-
maven {
65-
url "$System.env.MAVEN_PUBLISH_REGISTRY_URL"
66-
credentials {
67-
username "$System.env.MAVEN_USERNAME"
68-
password "$System.env.MAVEN_PASSWORD"
69-
}
70-
}
64+
developers {
65+
developer {
66+
id = "sebastianstehle"
67+
name = "Sebastian Stehle"
68+
url = "https://github.com/sebastianstehle/"
69+
}
7170
}
71+
scm {
72+
url = "https://github.com/squidex/squidex/"
73+
connection = "scm:git:git://github.com/squidex/squidex.git"
74+
developerConnection = "scm:git:ssh://git@github.com/squidex/squidex.git"
75+
}
76+
}
77+
78+
signAllPublications()
7279
}
7380

generate.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# docker run --rm -v ${PWD}:/local squidex/openapi-generator-cli config-help -g php
2-
docker run --rm -v ${PWD}:/local squidex/openapi-generator-cli generate -i /local/openapi.json -g java --template-dir /local/templates -o /local -c /local/openapi-config.yml
1+
# docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli config-help -g php
2+
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/openapi.json -g java --template-dir /local/templates -o /local -c /local/openapi-config.yml

openapi-config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ additionalProperties:
1212
invokerPackage: com.squidex.api.core
1313
modelPackage: com.squidex.api.types
1414
useRuntimeException: true
15-
useSingleRequestParameter: true
15+
useSingleRequestParameter: true
16+
17+
reservedWordsMappings:
18+
file: file

settings.gradle

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)