Skip to content

Commit 13f84af

Browse files
committed
refactored to work with bazel-vscode extension
1 parent 9121ee7 commit 13f84af

31 files changed

+4149
-7188
lines changed

.vscode/launch.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"runtimeExecutable": "${execPath}",
7575
"debugWebviews": true,
7676
"args": [
77+
"--disable-extensions",
7778
"--extensionDevelopmentPath=${workspaceRoot}",
7879
"--extensionDevelopmentPath=${workspaceRoot}/../vscode-java"
7980
],
@@ -96,6 +97,7 @@
9697
"request": "launch",
9798
"runtimeExecutable": "${execPath}",
9899
"args": [
100+
"--disable-extensions",
99101
"--disable-workspace-trust",
100102
"--extensionDevelopmentPath=${workspaceFolder}",
101103
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index",

flake.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
description = "A Nix-flake-based Java development environment";
3+
4+
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
5+
6+
outputs = { self, nixpkgs }:
7+
let
8+
javaVersion = 23; # Change this value to update the whole stack
9+
10+
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
11+
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
12+
pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; };
13+
});
14+
in
15+
{
16+
overlays.default =
17+
final: prev:
18+
let
19+
jdk = prev."jdk${toString javaVersion}";
20+
in
21+
{
22+
inherit jdk;
23+
maven = prev.maven.override { jdk_headless = jdk; };
24+
gradle = prev.gradle.override { java = jdk; };
25+
lombok = prev.lombok.override { inherit jdk; };
26+
};
27+
28+
devShells = forEachSupportedSystem ({ pkgs }: {
29+
default = pkgs.mkShell {
30+
packages = with pkgs; [
31+
gcc
32+
gradle
33+
jdk
34+
maven
35+
ncurses
36+
patchelf
37+
zlib
38+
];
39+
40+
shellHook =
41+
let
42+
loadLombok = "-javaagent:${pkgs.lombok}/share/java/lombok.jar";
43+
prev = "\${JAVA_TOOL_OPTIONS:+ $JAVA_TOOL_OPTIONS}";
44+
in
45+
''
46+
export JAVA_TOOL_OPTIONS="${loadLombok}${prev}"
47+
'';
48+
};
49+
});
50+
};
51+
}

0 commit comments

Comments
 (0)