Skip to content

Commit ccd21c6

Browse files
authored
feat: initial integration with FullstoryInjector (#5)
feat: initial integration with `FullstoryInjector
1 parent 85650ea commit ccd21c6

File tree

11 files changed

+275
-95
lines changed

11 files changed

+275
-95
lines changed

MODULE.bazel

+23-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,31 @@ module(
99
bazel_dep(name = "bazel_skylib", version = "1.7.1")
1010
bazel_dep(name = "platforms", version = "0.0.10")
1111
bazel_dep(name = "rules_android", version = "0.5.1")
12-
13-
bazel_dep(name = "gazelle", version = "0.39.1", dev_dependency = True, repo_name = "bazel_gazelle")
14-
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependency = True)
15-
bazel_dep(name = "aspect_bazel_lib", version = "2.9.3", dev_dependency = True)
16-
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)
17-
1812
single_version_override(
1913
module_name = "rules_android",
2014
patch_strip = 1,
2115
patches = ["//:patches/bazelbuild/rules_android/rules_bzl_lib.patch"],
2216
)
17+
18+
bazel_dep(name = "rules_java", version = "7.7.0")
19+
bazel_dep(name = "rules_jvm_external", version = "6.5")
20+
21+
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
22+
maven.install(
23+
name = "fs_maven",
24+
artifacts = [
25+
"com.fullstory:instrumentation-full:1.55.0-bazel0",
26+
],
27+
lock_file = "//:maven_install.json",
28+
repositories = [
29+
"m2Local",
30+
"https://repo1.maven.org/maven2",
31+
],
32+
)
33+
use_repo(maven, "fs_maven")
34+
35+
# Dev dependencies
36+
bazel_dep(name = "gazelle", version = "0.39.1", dev_dependency = True, repo_name = "bazel_gazelle")
37+
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependency = True)
38+
bazel_dep(name = "aspect_bazel_lib", version = "2.9.3", dev_dependency = True)
39+
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)

MODULE.bazel.lock

+36-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
# Bazel rules for Fullstory + Android
22

3+
> ## ⚠️ This is an experimental ruleset and not ready for usage ⚠️
4+
35
The rules provided here can be used to integrate the Fullstory SDK into APKs
46
generated by [`bazelbuild/rules_android`](https://github.com/bazelbuild/rules_android)
57

68
## Installation
79

10+
Not available yet
11+
12+
<!--
813
### Using Bzlmod
914
1015
This is available at [the Bazel Central Registry as `fullstory_rules_android`](https://registry.bazel.build/modules/fullstory_rules_android).
@@ -14,6 +19,7 @@ This is available at [the Bazel Central Registry as `fullstory_rules_android`](h
1419
From the release you wish to use:
1520
<https://github.com/fullstorydev/rules_android/releases>
1621
copy the WORKSPACE snippet into your `WORKSPACE` file.
22+
-->
1723

1824
## Usage
1925

android/private/BUILD.bazel

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2+
load("@rules_java//java:defs.bzl", "java_binary")
23

3-
bzl_library(
4-
name = "fullstory_android_binary",
5-
srcs = ["fullstory_android_binary.bzl"],
6-
visibility = ["//android:__subpackages__"],
7-
deps = ["@rules_android//android:rules"],
4+
java_binary(
5+
name = "FullstoryInjector",
6+
main_class = "com.fullstory.FullstoryInjector",
7+
runtime_deps = ["@fs_maven//:com_fullstory_instrumentation_full"],
88
)
99

1010
bzl_library(
11-
name = "versions",
12-
srcs = ["versions.bzl"],
11+
name = "fullstory_android_binary",
12+
srcs = ["fullstory_android_binary.bzl"],
1313
visibility = ["//android:__subpackages__"],
14+
deps = [
15+
"@rules_android//rules",
16+
"@rules_android//rules:utils",
17+
],
1418
)

0 commit comments

Comments
 (0)