Skip to content

Commit

Permalink
feat: initial integration with FullstoryInjector (#5)
Browse files Browse the repository at this point in the history
feat: initial integration with `FullstoryInjector
  • Loading branch information
vpanta authored Dec 4, 2024
1 parent 85650ea commit ccd21c6
Show file tree
Hide file tree
Showing 11 changed files with 275 additions and 95 deletions.
29 changes: 23 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,31 @@ module(
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_android", version = "0.5.1")

bazel_dep(name = "gazelle", version = "0.39.1", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.3", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)

single_version_override(
module_name = "rules_android",
patch_strip = 1,
patches = ["//:patches/bazelbuild/rules_android/rules_bzl_lib.patch"],
)

bazel_dep(name = "rules_java", version = "7.7.0")
bazel_dep(name = "rules_jvm_external", version = "6.5")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
name = "fs_maven",
artifacts = [
"com.fullstory:instrumentation-full:1.55.0-bazel0",
],
lock_file = "//:maven_install.json",
repositories = [
"m2Local",
"https://repo1.maven.org/maven2",
],
)
use_repo(maven, "fs_maven")

# Dev dependencies
bazel_dep(name = "gazelle", version = "0.39.1", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.9.3", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)
55 changes: 36 additions & 19 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Bazel rules for Fullstory + Android

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

## Installation

Not available yet

<!--
### Using Bzlmod
This is available at [the Bazel Central Registry as `fullstory_rules_android`](https://registry.bazel.build/modules/fullstory_rules_android).
Expand All @@ -14,6 +19,7 @@ This is available at [the Bazel Central Registry as `fullstory_rules_android`](h
From the release you wish to use:
<https://github.com/fullstorydev/rules_android/releases>
copy the WORKSPACE snippet into your `WORKSPACE` file.
-->

## Usage

Expand Down
18 changes: 11 additions & 7 deletions android/private/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@rules_java//java:defs.bzl", "java_binary")

bzl_library(
name = "fullstory_android_binary",
srcs = ["fullstory_android_binary.bzl"],
visibility = ["//android:__subpackages__"],
deps = ["@rules_android//android:rules"],
java_binary(
name = "FullstoryInjector",
main_class = "com.fullstory.FullstoryInjector",
runtime_deps = ["@fs_maven//:com_fullstory_instrumentation_full"],
)

bzl_library(
name = "versions",
srcs = ["versions.bzl"],
name = "fullstory_android_binary",
srcs = ["fullstory_android_binary.bzl"],
visibility = ["//android:__subpackages__"],
deps = [
"@rules_android//rules",
"@rules_android//rules:utils",
],
)
Loading

0 comments on commit ccd21c6

Please sign in to comment.