Skip to content

Commit 7e9caa8

Browse files
authored
Merge pull request #853 from square/rick/artifactsCheck_KMP_publications
capture KMP publications in artifacts-check
2 parents 7fe199f + 78e1760 commit 7e9caa8

File tree

5 files changed

+253
-61
lines changed

5 files changed

+253
-61
lines changed

.github/workflows/kotlin.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,26 @@ jobs :
5151
siteDokka --build-cache --stacktrace
5252
cache-read-only: false
5353

54+
# the `artifactsCheck` task has to run on macOS in order to see the iOS KMP artifacts
55+
artifacts-check :
56+
name : ArtifactsCheck
57+
runs-on : macos-latest
58+
timeout-minutes : 20
59+
steps :
60+
- uses : actions/checkout@v3
61+
- name : set up JDK 11
62+
uses : actions/setup-java@v3
63+
with :
64+
distribution: 'zulu'
65+
java-version : 11
66+
67+
## Actual task
68+
- uses: gradle/gradle-build-action@v2
69+
name : check published artifacts
70+
with :
71+
arguments : artifactsCheck
72+
cache-read-only: false
73+
5474
# These are all pretty quick so we run them on a single shard. Fewer shards, less queueing.
5575
check :
5676
name : Check
@@ -70,7 +90,7 @@ jobs :
7090
name : Check with Gradle
7191
with :
7292
arguments : |
73-
check apiCheck checkVersionIsSnapshot artifactsCheck dependencyGuard lint ktlintCheck jvmWorkflowNodeBenchmarkJar --stacktrace --continue
93+
allTests test apiCheck checkVersionIsSnapshot dependencyGuard lint ktlintCheck jvmWorkflowNodeBenchmarkJar --stacktrace --continue
7494
cache-read-only: false
7595

7696
# Report as Github Pull Request Check.

artifacts.json

Lines changed: 105 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,126 +5,214 @@
55
"artifactId": "workflow-internal-testing-utils",
66
"description": "Workflow internal testing utilities",
77
"packaging": "jar",
8-
"javaVersion": "1.8"
8+
"javaVersion": "1.8",
9+
"publicationName": "maven"
910
},
1011
{
1112
"gradlePath": ":trace-encoder",
1213
"group": "com.squareup.workflow1",
1314
"artifactId": "trace-encoder",
1415
"description": "Trace Encoder",
1516
"packaging": "jar",
16-
"javaVersion": "1.8"
17+
"javaVersion": "1.8",
18+
"publicationName": "maven"
19+
},
20+
{
21+
"gradlePath": ":workflow-core",
22+
"group": "com.squareup.workflow1",
23+
"artifactId": "workflow-core-iosarm64",
24+
"description": "Workflow Core",
25+
"packaging": "klib",
26+
"javaVersion": "1.8",
27+
"publicationName": "iosArm64"
28+
},
29+
{
30+
"gradlePath": ":workflow-core",
31+
"group": "com.squareup.workflow1",
32+
"artifactId": "workflow-core-iossimulatorarm64",
33+
"description": "Workflow Core",
34+
"packaging": "klib",
35+
"javaVersion": "1.8",
36+
"publicationName": "iosSimulatorArm64"
37+
},
38+
{
39+
"gradlePath": ":workflow-core",
40+
"group": "com.squareup.workflow1",
41+
"artifactId": "workflow-core-iosx64",
42+
"description": "Workflow Core",
43+
"packaging": "klib",
44+
"javaVersion": "1.8",
45+
"publicationName": "iosX64"
46+
},
47+
{
48+
"gradlePath": ":workflow-core",
49+
"group": "com.squareup.workflow1",
50+
"artifactId": "workflow-core-jvm",
51+
"description": "Workflow Core",
52+
"packaging": "jar",
53+
"javaVersion": "1.8",
54+
"publicationName": "jvm"
1755
},
1856
{
1957
"gradlePath": ":workflow-core",
2058
"group": "com.squareup.workflow1",
2159
"artifactId": "workflow-core",
2260
"description": "Workflow Core",
2361
"packaging": "jar",
24-
"javaVersion": "1.8"
62+
"javaVersion": "1.8",
63+
"publicationName": "kotlinMultiplatform"
64+
},
65+
{
66+
"gradlePath": ":workflow-runtime",
67+
"group": "com.squareup.workflow1",
68+
"artifactId": "workflow-runtime-iosarm64",
69+
"description": "Workflow Runtime",
70+
"packaging": "klib",
71+
"javaVersion": "1.8",
72+
"publicationName": "iosArm64"
73+
},
74+
{
75+
"gradlePath": ":workflow-runtime",
76+
"group": "com.squareup.workflow1",
77+
"artifactId": "workflow-runtime-iossimulatorarm64",
78+
"description": "Workflow Runtime",
79+
"packaging": "klib",
80+
"javaVersion": "1.8",
81+
"publicationName": "iosSimulatorArm64"
82+
},
83+
{
84+
"gradlePath": ":workflow-runtime",
85+
"group": "com.squareup.workflow1",
86+
"artifactId": "workflow-runtime-iosx64",
87+
"description": "Workflow Runtime",
88+
"packaging": "klib",
89+
"javaVersion": "1.8",
90+
"publicationName": "iosX64"
91+
},
92+
{
93+
"gradlePath": ":workflow-runtime",
94+
"group": "com.squareup.workflow1",
95+
"artifactId": "workflow-runtime-jvm",
96+
"description": "Workflow Runtime",
97+
"packaging": "jar",
98+
"javaVersion": "1.8",
99+
"publicationName": "jvm"
25100
},
26101
{
27102
"gradlePath": ":workflow-runtime",
28103
"group": "com.squareup.workflow1",
29104
"artifactId": "workflow-runtime",
30105
"description": "Workflow Runtime",
31106
"packaging": "jar",
32-
"javaVersion": "1.8"
107+
"javaVersion": "1.8",
108+
"publicationName": "kotlinMultiplatform"
33109
},
34110
{
35111
"gradlePath": ":workflow-rx2",
36112
"group": "com.squareup.workflow1",
37113
"artifactId": "workflow-rx2",
38114
"description": "Workflow RxJava2",
39115
"packaging": "jar",
40-
"javaVersion": "1.8"
116+
"javaVersion": "1.8",
117+
"publicationName": "maven"
41118
},
42119
{
43120
"gradlePath": ":workflow-testing",
44121
"group": "com.squareup.workflow1",
45122
"artifactId": "workflow-testing-jvm",
46123
"description": "Workflow Testing",
47124
"packaging": "jar",
48-
"javaVersion": "1.8"
125+
"javaVersion": "1.8",
126+
"publicationName": "maven"
49127
},
50128
{
51129
"gradlePath": ":workflow-tracing",
52130
"group": "com.squareup.workflow1",
53131
"artifactId": "workflow-tracing",
54132
"description": "Workflow Tracing",
55133
"packaging": "jar",
56-
"javaVersion": "1.8"
134+
"javaVersion": "1.8",
135+
"publicationName": "maven"
57136
},
58137
{
59138
"gradlePath": ":workflow-config:config-android",
60139
"group": "com.squareup.workflow1",
61140
"artifactId": "workflow-config-android",
62141
"description": "Workflow Runtime Android Configuration",
63142
"packaging": "aar",
64-
"javaVersion": "1.8"
143+
"javaVersion": "1.8",
144+
"publicationName": "maven"
65145
},
66146
{
67147
"gradlePath": ":workflow-config:config-jvm",
68148
"group": "com.squareup.workflow1",
69149
"artifactId": "workflow-config-jvm",
70150
"description": "Workflow Runtime JVM Configuration",
71151
"packaging": "jar",
72-
"javaVersion": "1.8"
152+
"javaVersion": "1.8",
153+
"publicationName": "maven"
73154
},
74155
{
75156
"gradlePath": ":workflow-ui:compose",
76157
"group": "com.squareup.workflow1",
77158
"artifactId": "workflow-ui-compose",
78159
"description": "Workflow UI Compose",
79160
"packaging": "aar",
80-
"javaVersion": "1.8"
161+
"javaVersion": "1.8",
162+
"publicationName": "maven"
81163
},
82164
{
83165
"gradlePath": ":workflow-ui:compose-tooling",
84166
"group": "com.squareup.workflow1",
85167
"artifactId": "workflow-ui-compose-tooling",
86168
"description": "Workflow UI Compose Tooling",
87169
"packaging": "aar",
88-
"javaVersion": "1.8"
170+
"javaVersion": "1.8",
171+
"publicationName": "maven"
89172
},
90173
{
91174
"gradlePath": ":workflow-ui:container-android",
92175
"group": "com.squareup.workflow1",
93176
"artifactId": "workflow-ui-container-android",
94177
"description": "Workflow UI Container Android",
95178
"packaging": "aar",
96-
"javaVersion": "1.8"
179+
"javaVersion": "1.8",
180+
"publicationName": "maven"
97181
},
98182
{
99183
"gradlePath": ":workflow-ui:container-common",
100184
"group": "com.squareup.workflow1",
101185
"artifactId": "workflow-ui-container-common-jvm",
102186
"description": "Workflow UI Container",
103187
"packaging": "jar",
104-
"javaVersion": "1.8"
188+
"javaVersion": "1.8",
189+
"publicationName": "maven"
105190
},
106191
{
107192
"gradlePath": ":workflow-ui:core-android",
108193
"group": "com.squareup.workflow1",
109194
"artifactId": "workflow-ui-core-android",
110195
"description": "Workflow UI Android",
111196
"packaging": "aar",
112-
"javaVersion": "1.8"
197+
"javaVersion": "1.8",
198+
"publicationName": "maven"
113199
},
114200
{
115201
"gradlePath": ":workflow-ui:core-common",
116202
"group": "com.squareup.workflow1",
117203
"artifactId": "workflow-ui-core-common-jvm",
118204
"description": "Workflow UI Core",
119205
"packaging": "jar",
120-
"javaVersion": "1.8"
206+
"javaVersion": "1.8",
207+
"publicationName": "maven"
121208
},
122209
{
123210
"gradlePath": ":workflow-ui:radiography",
124211
"group": "com.squareup.workflow1",
125212
"artifactId": "workflow-ui-radiography",
126213
"description": "Workflow UI Radiography Support",
127214
"packaging": "aar",
128-
"javaVersion": "1.8"
215+
"javaVersion": "1.8",
216+
"publicationName": "maven"
129217
}
130-
]
218+
]

buildSrc/src/main/java/com/squareup/workflow1/buildsrc/artifacts/ArtifactConfig.kt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ import java.io.Serializable
99
* see (Niklas Baudy's
1010
* [gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin))
1111
*
12-
* @param gradlePath the path of the Gradle project, such as `:workflow-core`
13-
* @param group The maven "group", which should always be `com.squareup.workflow1`. This is the
12+
* @property gradlePath the path of the Gradle project, such as `:workflow-core`
13+
* @property group The maven "group", which should always be `com.squareup.workflow1`. This is the
1414
* `GROUP` property in the Gradle plugin.
15-
* @param artifactId The maven "module", such as `workflow-core-jvm`. This is the
15+
* @property artifactId The maven "module", such as `workflow-core-jvm`. This is the
1616
* `POM_ARTIFACT_ID` property in the Gradle plugin.
17-
* @param description The description of this specific artifact, such as "Workflow Core". This is
17+
* @property description The description of this specific artifact, such as "Workflow Core". This is
1818
* the `POM_NAME` property in the Gradle plugin.
19-
* @param packaging `aar` or `jar`. This is the `POM_PACKAGING` property in the Gradle plugin.
20-
* @param javaVersion the java version of the artifact (typically 8 or 11). If not set
19+
* @property packaging `aar` or `jar`. This is the `POM_PACKAGING` property in the Gradle plugin.
20+
* @property javaVersion the java version of the artifact (typically 8 or 11). If not set
2121
* explicitly, this defaults to the JDK version used to build the artifact.
22+
* @property publicationName typically 'maven', but other things for KMP artifacts
2223
*/
2324
@JsonClass(generateAdapter = true)
2425
data class ArtifactConfig(
@@ -27,5 +28,8 @@ data class ArtifactConfig(
2728
val artifactId: String,
2829
val description: String,
2930
val packaging: String,
30-
val javaVersion: String
31-
) : Serializable
31+
val javaVersion: String,
32+
val publicationName: String
33+
) : Serializable {
34+
val key = "$gradlePath+$publicationName"
35+
}

0 commit comments

Comments
 (0)