Skip to content

Commit 94bf59a

Browse files
authored
Merge pull request #178 from SpineEventEngine/1.x-update-dependencies
[1.x] Update to Spine 1.9 API
2 parents e09443c + c2aed29 commit 94bf59a

File tree

17 files changed

+694
-510
lines changed

17 files changed

+694
-510
lines changed

.github/workflows/build-on-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
- uses: actions/setup-java@v3
1616
with:
17-
java-version: 8
17+
java-version: 11
1818
distribution: zulu
1919

2020
# This operation is specific to `gcloud-java` repository only.

.github/workflows/increment_guard.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v1
1616

17-
- uses: actions/setup-java@v1
17+
- uses: actions/setup-java@v3
1818
with:
19-
java-version: 1.8
19+
java-version: 11
20+
distribution: zulu
2021

2122
- name: Pull config
2223
run: git submodule update --init --recursive

.github/workflows/publish-v1.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Publishing for Spine v1.x
2+
3+
on:
4+
push:
5+
branches:
6+
- v1
7+
- 1.x-dev
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
submodules: 'true'
16+
17+
- uses: actions/setup-java@v3
18+
with:
19+
java-version: 11
20+
distribution: zulu
21+
cache: gradle
22+
23+
- name: Decrypt CloudRepo credentials
24+
run: ./config/scripts/decrypt.sh "$CLOUDREPO_CREDENTIALS_KEY" ./.github/keys/cloudrepo.properties.gpg ./cloudrepo.properties
25+
env:
26+
CLOUDREPO_CREDENTIALS_KEY: ${{ secrets.CLOUDREPO_CREDENTIALS_KEY }}
27+
28+
- name: Decrypt Git SSH credentials
29+
run: ./config/scripts/decrypt.sh "$GIT_CREDENTIALS_KEY" ./.github/keys/deploy_key_rsa.gpg ./deploy_key_rsa
30+
env:
31+
GIT_CREDENTIALS_KEY: ${{ secrets.GIT_CREDENTIALS_KEY }}
32+
33+
# Make sure the SSH key is not "too visible". SSH agent will not accept it otherwise.
34+
- name: Set file system permissions
35+
run: chmod 400 ./deploy_key_rsa && chmod +x ./config/scripts/register-ssh-key.sh
36+
37+
- name: Decrypt GCS credentials
38+
run: ./config/scripts/decrypt.sh "$GCS_CREDENTIALS_KEY" ./.github/keys/gcs-auth-key.json.gpg ./gcs-auth-key.json
39+
env:
40+
GCS_CREDENTIALS_KEY: ${{ secrets.GCS_CREDENTIALS_KEY }}
41+
42+
- name: Decrypt GCAR credentials
43+
run: ./config/scripts/decrypt.sh "$MAVEN_PUBLISHER_KEY" ./.github/keys/maven-publisher.json.gpg ./maven-publisher.json
44+
env:
45+
MAVEN_PUBLISHER_KEY: ${{ secrets.MAVEN_PUBLISHER_KEY }}
46+
47+
- name: Decrypt Git SSH credentials
48+
run: ./config/scripts/decrypt.sh "$GRADLE_PORTAL_CREDENTIALS_KEY" ./.github/keys/gradle-plugin-portal.secret.properties.gpg ./gradle-plugin-portal.secret.properties
49+
env:
50+
GRADLE_PORTAL_CREDENTIALS_KEY: ${{ secrets.GRADLE_PORTAL_CREDENTIALS_KEY }}
51+
52+
- name: Append Gradle properties
53+
run: cat ./gradle-plugin-portal.secret.properties >> ./gradle.properties
54+
55+
- name: Publish artifacts to Maven
56+
# Since we're in the `v1`/`1.x-dev` branch already, this means that tests of a PR passed.
57+
# So, no need to run the tests again when publishing.\
58+
#
59+
# Also, we don't want to update the GitHub Pages content, as it may be already
60+
# updated with the contents of 2.x branch. So this operation should be performed
61+
# manually, if really needed.
62+
# See https://github.com/SpineEventEngine/config/tree/master/scripts/publish-documentation.
63+
run: ./gradlew publish -x test -x updateGitHubPages --stacktrace
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
FORMAL_GIT_HUB_PAGES_AUTHOR: developers@spine.io
67+
# https://docs.github.com/en/actions/reference/environment-variables
68+
REPO_SLUG: $GITHUB_REPOSITORY # e.g. SpineEventEngine/core-java
69+
GOOGLE_APPLICATION_CREDENTIALS: ./maven-publisher.json
70+
NPM_TOKEN: ${{ secrets.NPM_SECRET }}

build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,15 @@ subprojects {
8484
from(Deps.scripts.slowTests(project))
8585
from(Deps.scripts.testOutput(project))
8686
from(Deps.scripts.javadocOptions(project))
87-
from(Deps.scripts.javacArgs(project))
87+
88+
// Instead of using `Deps.scripts.javacArgs(project)`, this project needs a special
89+
// version of this script, made for JDK 11.
90+
//
91+
// The reason is that Datastore emulator now requires JDK 11+ to start,
92+
// and this library requires it in order to run tests.
93+
//
94+
from("${rootDir}/javac-args-jdk11.gradle")
95+
8896
from(Deps.scripts.projectLicenseReport(project))
8997
from(Deps.scripts.pmd(project))
9098
}

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ plugins {
3030

3131
repositories {
3232
mavenLocal()
33-
jcenter()
33+
mavenCentral()
3434
}
3535

3636
val jacksonVersion = "2.11.0"

buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,15 @@ object DependencyResolution {
365365
includeGroup("io.spine.gcloud")
366366
}
367367
}
368-
repositories.jcenter()
368+
repositories.maven {
369+
url = URI(Repos.spineSnapshots)
370+
content {
371+
includeGroup("io.spine")
372+
includeGroup("io.spine.tools")
373+
includeGroup("io.spine.gcloud")
374+
}
375+
}
376+
repositories.mavenCentral()
369377
repositories.maven {
370378
url = URI(Repos.gradlePlugins)
371379
}

config

Submodule config updated 51 files

datastore/src/test/java/io/spine/server/storage/datastore/DsAggregateStorageTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import com.google.protobuf.Any;
3232
import com.google.protobuf.Timestamp;
3333
import com.google.protobuf.util.Timestamps;
34-
import io.spine.base.Tests;
34+
import io.spine.environment.Tests;
3535
import io.spine.core.Event;
3636
import io.spine.core.Version;
3737
import io.spine.protobuf.AnyPacker;

datastore/src/test/java/io/spine/server/storage/datastore/DsAggregateStorageTruncationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
package io.spine.server.storage.datastore;
2828

29-
import io.spine.base.Tests;
29+
import io.spine.environment.Tests;
3030
import io.spine.server.ServerEnvironment;
3131
import io.spine.server.aggregate.AggregateStorageTruncationTest;
3232
import io.spine.testing.server.storage.datastore.TestDatastoreStorageFactory;

datastore/src/test/java/io/spine/server/storage/datastore/DsCatchUpSmokeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
package io.spine.server.storage.datastore;
2828

29-
import io.spine.base.Tests;
29+
import io.spine.environment.Tests;
3030
import io.spine.server.ServerEnvironment;
3131
import io.spine.server.delivery.CatchUpTest;
3232
import io.spine.testing.SlowTest;

0 commit comments

Comments
 (0)