Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazel 6 Migration #34

Merged
merged 103 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
1c8dcbf
start of bazel 6 + rules_js migration
adierkens Nov 21, 2023
29b840c
builds + package.json creation
adierkens Nov 22, 2023
10d56d5
Plugins folder builds and tests working
adierkens Nov 28, 2023
64a7a04
Add docs generation
adierkens Nov 29, 2023
8ead765
Add docs generation
adierkens Nov 29, 2023
d9c8d7c
Split native bundles into separate target
adierkens Dec 6, 2023
c62030f
set visibility of js_library for use in iOS targets
hborawski Dec 5, 2023
6923914
remove undefined symbol
hborawski Dec 6, 2023
8429ff0
set visibility on native target
hborawski Dec 6, 2023
a162602
Merge pull request #36 from player-ui/spm-bazel-6
hborawski Dec 8, 2023
108f89d
chore: changes tsconfig template to esnext
rafbcampos Feb 8, 2024
458c610
Get stamping working within tsup builds
adierkens Feb 15, 2024
2370c13
Add stamping support to package_json creation
adierkens Feb 15, 2024
1b051fb
Fix tests
adierkens Feb 16, 2024
0372da2
Add custom publish rule
adierkens Feb 23, 2024
24f4cd0
Fix syntax
adierkens Feb 23, 2024
394aaeb
Omit default entrypoints for package creation if specified
KetanReddy Feb 27, 2024
472adc4
Merge pull request #40 from player-ui/bazel-6-stamping
adierkens Feb 28, 2024
56d4319
dont write out any exports if using custom entrypoints
KetanReddy Mar 5, 2024
e71339c
Update css rules and dsl
adierkens Mar 6, 2024
090a087
Add macro for oclif cli/plugin building
KetanReddy Apr 5, 2024
d003efc
Fix targets for for oclif publishing
KetanReddy Apr 9, 2024
71a2c7f
Update config search path to remove bin/ prefix
adierkens Apr 16, 2024
50ca058
Add presets config
adierkens Apr 16, 2024
309110c
Fix preset config
adierkens Apr 16, 2024
7c7f0f2
Skip validation during dsl compile phase
adierkens Apr 16, 2024
ddd9453
All flag for skipping validation on compiled output
adierkens Apr 16, 2024
c0f7c97
Update DSL build rules to export individual files
adierkens Apr 17, 2024
444af3c
Update validation call for multiple mocks
adierkens Apr 24, 2024
d6b9527
Update player config to use js relative paths
adierkens Apr 24, 2024
9f871a1
Add rule for creating XLR configs
adierkens Apr 25, 2024
16d6ddb
Add way to passthrough more packaging targets
adierkens Apr 25, 2024
30063d4
Update input_dir to be configurable
adierkens Apr 25, 2024
164466e
Merge branch 'main' into bazel-6
sugarmanz Apr 25, 2024
afb93d2
Add js_xlr_pipeline macro
adierkens Apr 25, 2024
2c83a22
Update config search path to remove bin/ prefix
adierkens Apr 16, 2024
d17ae79
Enable build caching for rules
adierkens Apr 26, 2024
44f92b7
Add presets config
adierkens Apr 16, 2024
d0e1edb
Fix preset config
adierkens Apr 16, 2024
73280fe
Skip validation during dsl compile phase
adierkens Apr 16, 2024
0cfbb3a
All flag for skipping validation on compiled output
adierkens Apr 16, 2024
1750427
Update DSL build rules to export individual files
adierkens Apr 17, 2024
5d70021
Update validation call for multiple mocks
adierkens Apr 24, 2024
78afa98
Update player config to use js relative paths
adierkens Apr 24, 2024
c306037
Add rule for creating XLR configs
adierkens Apr 25, 2024
5ea0ec5
Add way to passthrough more packaging targets
adierkens Apr 25, 2024
c99aa8b
Update input_dir to be configurable
adierkens Apr 25, 2024
5cea23b
Add js_xlr_pipeline macro
adierkens Apr 25, 2024
4e7c6c1
set up maven and kotlin stuff
brocollie08 Apr 4, 2024
7dc499f
expose public api
brocollie08 Apr 4, 2024
c2bc06d
add deps for BUILD
brocollie08 Apr 4, 2024
8261234
maybe junit5
brocollie08 Apr 4, 2024
f29b25a
distribution and lint building
brocollie08 Apr 5, 2024
a345c49
no maven pinning
brocollie08 Apr 6, 2024
f2bc563
junit
brocollie08 Apr 6, 2024
b0f4e96
bzlmod junit instead
brocollie08 Apr 6, 2024
e1140a8
separate .bzl for extension
brocollie08 Apr 6, 2024
03e7494
remove duplicate junit5 def
brocollie08 Apr 8, 2024
a70db63
back to workspce def
brocollie08 Apr 8, 2024
04d2c10
??
brocollie08 Apr 8, 2024
063719e
workspace.bzlmod
brocollie08 Apr 8, 2024
f05c3b1
remove rules_java
brocollie08 Apr 8, 2024
c7d3127
add junit5 macros locally
brocollie08 Apr 8, 2024
7f51fbd
dummy kt_jvm to be reverted
brocollie08 Apr 8, 2024
9592cb4
lint changed to stupidity
brocollie08 Apr 8, 2024
d4ad1bd
remove WORKSPACE.bzlmod, git override rules kotlin
brocollie08 Apr 9, 2024
e58aaf7
revert git override
brocollie08 Apr 9, 2024
3ad20fd
update jvm rules
brocollie08 Apr 9, 2024
eb053a0
rules_jvm fork
brocollie08 Apr 9, 2024
048caed
swap order
brocollie08 Apr 9, 2024
7427ab5
reformat junit maven dep
brocollie08 Apr 10, 2024
0be9db4
add configuration for overriding mocks output_dir
sugarmanz May 20, 2024
c7eabdf
add generic stamp rule back in to stamp Podspec
hborawski Jun 4, 2024
ebb4360
Merge pull request #46 from player-ui/stamp-readd
hborawski Jun 4, 2024
90f613e
move over common utils.bzl macros to be reused for playerplugins
Jun 6, 2024
7eab4b1
address comments
Jun 7, 2024
e495a5d
Merge pull request #48 from player-ui/shared-ios-utils
nancywu1 Jun 10, 2024
457dba1
ui tests run under uitest target
Jun 17, 2024
4c4c60d
update comments
Jun 17, 2024
296cf55
test commit
Jun 17, 2024
2699dde
Merge pull request #49 from player-ui/seperate-out-uitests
nancywu1 Jun 17, 2024
41b4a4c
update android setup
brocollie08 Jun 17, 2024
749b5d4
Merge branch 'bazel-6' into bazel-6-jvm
brocollie08 Jun 17, 2024
10252ce
put publishing stuff back
brocollie08 Jun 27, 2024
2bf335a
correct rules_jvm_external
brocollie08 Jun 28, 2024
466ed8b
Merge pull request #43 from player-ui/feature/oclif-macro
KetanReddy Jul 9, 2024
f9182ee
Merge pull request #45 from player-ui/bazel-6-xlr
KetanReddy Jul 9, 2024
d0752e5
Merge branch 'bazel-6' of https://github.com/player-ui/rules_player i…
KetanReddy Jul 9, 2024
93d45c0
Merge pull request #44 from player-ui/dsl-config-location
KetanReddy Jul 9, 2024
3abf273
Merge branch 'bazel-6' into bazel-6-jvm
brocollie08 Jul 10, 2024
a1b9b5d
fixed version rules_jvm_external
brocollie08 Jul 10, 2024
5f4359e
Merge branch 'bazel-6-jvm' of github.com:player-ui/rules_player into …
brocollie08 Jul 10, 2024
d3f1129
name maven repo
brocollie08 Jul 10, 2024
fbb1f24
test + some clean up
brocollie08 Jul 11, 2024
1098132
consume rules as consumers would
brocollie08 Jul 11, 2024
3d9b637
pick up test targets from kotlin example
brocollie08 Jul 11, 2024
a9d37b8
consumer install deps
brocollie08 Jul 11, 2024
9963da8
put back accidental removal
brocollie08 Jul 11, 2024
1990053
Merge pull request #50 from player-ui/bazel-6-jvm
brocollie08 Jul 11, 2024
d858486
Update docs
adierkens Jul 11, 2024
490eeff
Test rules repo & examples
sugarmanz Jul 11, 2024
ed33cd1
Merge pull request #53 from player-ui/bazel-6-docs-update
adierkens Jul 11, 2024
6d81ed3
Fix resolution of output directory for dsl compilation
KetanReddy Jul 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
javascript/examples
kotlin/example
32 changes: 30 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# Use embedded JDK
common --repo_env=JAVA_HOME=../bazel_tools/jdk
common --enable_bzlmod
common --experimental_google_legacy_api

build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://remote.buildbuddy.io
build --remote_cache=grpcs://remote.buildbuddy.io
build --experimental_remote_cache_compression
build --experimental_remote_cache_async
build --remote_download_toplevel
build --remote_timeout=3600
build --build_metadata=REPO_URL=https://github.com/player-ui/rules_player.git

test --bes_results_url=https://app.buildbuddy.io/invocation/
test --bes_backend=grpcs://remote.buildbuddy.io
test --remote_cache=grpcs://remote.buildbuddy.io
test --experimental_remote_cache_compression
test --experimental_remote_cache_async
test --remote_download_toplevel
test --remote_timeout=3600
test --build_metadata=REPO_URL=https://github.com/player-ui/rules_player.git

coverage --bes_results_url=https://app.buildbuddy.io/invocation/
coverage --bes_backend=grpcs://remote.buildbuddy.io
coverage --remote_cache=grpcs://remote.buildbuddy.io
coverage --experimental_remote_cache_compression
coverage --experimental_remote_cache_async
coverage --remote_download_toplevel
coverage --remote_timeout=3600
coverage --build_metadata=REPO_URL=https://github.com/player-ui/rules_player.git
Comment on lines +4 to +29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we collapse these into common:

Suggested change
build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://remote.buildbuddy.io
build --remote_cache=grpcs://remote.buildbuddy.io
build --experimental_remote_cache_compression
build --experimental_remote_cache_async
build --remote_download_toplevel
build --remote_timeout=3600
build --build_metadata=REPO_URL=https://github.com/player-ui/rules_player.git
test --bes_results_url=https://app.buildbuddy.io/invocation/
test --bes_backend=grpcs://remote.buildbuddy.io
test --remote_cache=grpcs://remote.buildbuddy.io
test --experimental_remote_cache_compression
test --experimental_remote_cache_async
test --remote_download_toplevel
test --remote_timeout=3600
test --build_metadata=REPO_URL=https://github.com/player-ui/rules_player.git
coverage --bes_results_url=https://app.buildbuddy.io/invocation/
coverage --bes_backend=grpcs://remote.buildbuddy.io
coverage --remote_cache=grpcs://remote.buildbuddy.io
coverage --experimental_remote_cache_compression
coverage --experimental_remote_cache_async
coverage --remote_download_toplevel
coverage --remote_timeout=3600
coverage --build_metadata=REPO_URL=https://github.com/player-ui/rules_player.git
common --bes_results_url=https://app.buildbuddy.io/invocation/
common --bes_backend=grpcs://remote.buildbuddy.io
common --remote_cache=grpcs://remote.buildbuddy.io
common --experimental_remote_cache_compression
common --experimental_remote_cache_async
common --remote_download_toplevel
common --remote_timeout=3600
common --build_metadata=REPO_URL=https://github.com/player-ui/rules_player.git


try-import %workspace%/.bazelrc.local
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.4.1
6.4.0
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ jobs:
at: ~/rules_player
- run:
name: Test
command: bazel test //...
- run:
name: Test Examples
command: ./scripts/test.sh

release:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ user.bazelrc
**/node_modules/

**/.DS_Store
.bazelrc.local
50 changes: 50 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
module(name = "rules_player", version = "1.0")

bazel_dep(name = "aspect_bazel_lib", version = "1.32.0")
bazel_dep(name = "aspect_rules_js", version = "1.33.1")
bazel_dep(name = "aspect_rules_rollup", version = "1.0.0")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "rules_pkg", version = "0.9.1")
bazel_dep(name = "aspect_rules_ts", version = "2.1.0")
bazel_dep(name = "platforms", version = "0.0.5")

rules_ts_ext = use_extension(
"@aspect_rules_ts//ts:extensions.bzl",
"ext",
dev_dependency = True,
)

rules_ts_ext.deps()

use_repo(rules_ts_ext, "npm_typescript")

bazel_dep(name = "rules_kotlin", version = "1.9.1")

bazel_dep(name = "rules_jvm_external", version = "5.3")
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

maven.install(
name = "rules_player_maven",
artifacts = [
"com.github.ajalt.clikt:clikt-jvm:3.4.0",
"io.github.gradle-nexus:publish-plugin:1.1.0",
"ch.qos.logback:logback-classic:1.2.11",
"org.junit.jupiter:junit-jupiter-api:5.7.2",
"org.junit.jupiter:junit-jupiter-params:5.7.2",
"org.junit.jupiter:junit-jupiter-engine:5.7.2",
"org.junit.platform:junit-platform-suite-api:1.7.2",
"org.junit.platform:junit-platform-console:1.7.2",
"org.junit.platform:junit-platform-launcher:1.7.2"
],
fetch_sources = True,
repositories = [
"https://repo1.maven.org/maven2",
"https://maven.google.com/",
"https://plugins.gradle.org/m2/",
]
)
use_repo(maven, "rules_player_maven")
## Rule Dependencies
bazel_dep(name = "rules_swift", version = "1.18.0", repo_name = "build_bazel_rules_swift")
bazel_dep(name = "rules_apple", version = "3.5.1", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_ios", version = "4.3.1", repo_name = "build_bazel_rules_ios")
80 changes: 0 additions & 80 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,85 +1,5 @@
workspace(
name = "rules_player",
managed_directories = {
"@npm": ["node_modules"],
},
)

# Defines all potential dependencies -- loading these deps is done lazily on first access
load(":workspace.bzl", "deps")

deps()

# Like right here
# load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
# bazel_skylib_workspace()
load("//:conf.bzl", "apple", "distribution", "javascript", "skylib", "kotlin")

skylib()

# apple()

distribution()

javascript()

kotlin()

# TODO: This breaks the conf.bzl standard... b/c of the way bzl files
# are required to be structured, we can't consolidate config logic
# to a sinlge .bzl file. This is super frustrating when it comes to
# consolidating and standardizing common workspace configuration for
# Bazel projects and just adds to boilerplate overhead, even if in
# the name of being explicit.
# load("//swift:rules_deps.bzl", "rules_deps")

# rules_deps()

# load("//swift:extra_deps.bzl", "extra_deps")

# extra_deps()

# load("//apple:support_deps.bzl", "support_deps")

# support_deps()


load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")

kt_register_toolchains()

load("@rules_player//junit5:conf.bzl", "junit5")

junit5()

######################
# Maven Dependencies #
######################
load("@rules_player//distribution:deps.bzl", artifacts = "maven")
load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = artifacts,
fetch_sources = True,
repositories = [
"https://repo1.maven.org/maven2",
"https://maven.google.com/",
"https://plugins.gradle.org/m2/",
],
)

#####################
# Yarn Dependencies #
#####################
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")

node_repositories(
node_version = "16.12.0",
yarn_version = "1.22.17",
)

yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
3 changes: 3 additions & 0 deletions WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
android_sdk_repository(
name = "androidsdk",
)
6 changes: 0 additions & 6 deletions android/workspace.bzl

This file was deleted.

Empty file removed apple/BUILD
Empty file.
3 changes: 0 additions & 3 deletions apple/conf.bzl

This file was deleted.

22 changes: 0 additions & 22 deletions apple/rules_deps.bzl

This file was deleted.

7 changes: 0 additions & 7 deletions apple/support_deps.bzl

This file was deleted.

31 changes: 0 additions & 31 deletions apple/workspace.bzl

This file was deleted.

Empty file removed bazel/BUILD
Empty file.
7 changes: 0 additions & 7 deletions bazel/conf.bzl

This file was deleted.

13 changes: 0 additions & 13 deletions bazel/workspace.bzl

This file was deleted.

11 changes: 0 additions & 11 deletions cocoapods/BUILD

This file was deleted.

Loading