Skip to content

Commit

Permalink
Add Wasm JS as a common target (#2169)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton authored Jul 9, 2024
1 parent 8ac0aa4 commit 7db3477
Show file tree
Hide file tree
Showing 21 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[Unreleased]: https://github.com/cashapp/redwood/compare/0.12.0...HEAD

New:
- Nothing yet!
- Wasm JS added as a target for common Redwood modules. There is no Treehouse support today.

Changed:
- The `TreehouseApp` type is now an abstract class. This should make it easier to write unit tests for code that integrates Treehouse.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ private class RedwoodBuildExtensionImpl(private val project: Project) : RedwoodB
iosTargets()
modifiedGroup[JsTests, NodeJs].applyTo(js())
jvm()
wasmJs().nodejs()
}
// Needed for lint in downstream Android projects to analyze this dependency.
project.plugins.apply("com.android.lint")
Expand All @@ -312,6 +313,7 @@ private class RedwoodBuildExtensionImpl(private val project: Project) : RedwoodB
iosTargets()
modifiedGroup[JsTests, NodeJs].applyTo(js())
jvm()
wasmJs().nodejs()
}
}
Tooling -> {
Expand Down
2 changes: 1 addition & 1 deletion redwood-compose/api/redwood-compose.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Alias: ios => [iosArm64, iosSimulatorArm64, iosX64]
// Rendering settings:
// - Signature version: 2
Expand Down
2 changes: 1 addition & 1 deletion redwood-layout-api/api/redwood-layout-api.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-layout-compose/api/redwood-layout-compose.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-layout-testing/api/redwood-layout-testing.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-layout-widget/api/redwood-layout-widget.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-lazylayout-api/api/redwood-lazylayout-api.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-protocol-guest/api/redwood-protocol-guest.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-protocol-host/api/redwood-protocol-host.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-protocol/api/redwood-protocol.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-runtime/api/redwood-runtime.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Alias: ios => [iosArm64, iosSimulatorArm64, iosX64]
// Rendering settings:
// - Signature version: 2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (C) 2023 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package app.cash.redwood.ui

internal actual const val DENSITY_MULTIPLIER = 1.0
2 changes: 1 addition & 1 deletion redwood-testing/api/redwood-testing.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-widget-compose/api/redwood-widget-compose.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-widget-testing/api/redwood-widget-testing.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Rendering settings:
// - Signature version: 2
// - Show manifest properties: true
Expand Down
2 changes: 1 addition & 1 deletion redwood-widget/api/redwood-widget.klib.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Klib ABI Dump
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js]
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs]
// Alias: ios => [iosArm64, iosSimulatorArm64, iosX64]
// Rendering settings:
// - Signature version: 2
Expand Down

0 comments on commit 7db3477

Please sign in to comment.