Skip to content

Commit f81f81c

Browse files
authored
rewrite client in Java (#54)
Rewrite the client in native Java. There were no new features added in this change, but that's the first step in moving to a faster development cycle for NetBird client.
1 parent 7a02f88 commit f81f81c

File tree

447 files changed

+4494
-73853
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+4494
-73853
lines changed

.eslintrc.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/build-debug.yml

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,58 +12,43 @@ jobs:
1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v3
15-
15+
with:
16+
submodules: recursive
1617
- name: Setup Java
1718
uses: actions/setup-java@v3
1819
with:
19-
java-version: "11"
20+
java-version: "17"
2021
distribution: "adopt"
2122
cache: "gradle"
22-
- name: Setup Node
23-
uses: actions/setup-node@v3
24-
with:
25-
node-version: '19'
2623
- name: Install Go
2724
uses: actions/setup-go@v4
2825
with:
2926
go-version: "1.23.3"
3027
- name: Setup Android SDK
3128
uses: android-actions/setup-android@v3
3229
with:
33-
cmdline-tools-version: 8512546
30+
cmdline-tools-version: 12266719
3431
- name: NDK Cache
3532
id: ndk-cache
3633
uses: actions/cache@v3
3734
with:
3835
path: /usr/local/lib/android/sdk/ndk
3936
key: ndk-cache-23.1.7779620
4037
- name: Setup NDK
41-
run: /usr/local/lib/android/sdk/cmdline-tools/7.0/bin/sdkmanager --install "ndk;23.1.7779620"
42-
- name: Checkout netbird repository
43-
uses: actions/checkout@v3
44-
with:
45-
repository: netbirdio/netbird
46-
ref: main
47-
path: netbird
48-
- name: install gomobile
38+
run: /usr/local/lib/android/sdk/cmdline-tools/16.0/bin/sdkmanager --install "ndk;23.1.7779620"
39+
- name: Install gomobile
4940
run: go install golang.org/x/mobile/cmd/[email protected]
50-
- name: build android nebtird lib
51-
run: PATH=$PATH:$(go env GOPATH)/bin bash -x build-android-lib.sh $GITHUB_WORKSPACE/netbird
41+
- name: Build NetBird Go library
42+
run: PATH=$PATH:$(go env GOPATH)/bin bash -x build-android-lib.sh
5243
env:
5344
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/23.1.7779620
54-
- name: add react-native lib
55-
run: yarn add file:./react/netbird-lib
56-
- name: yarn install deps
57-
run: yarn install
58-
- name: npx reacti-native bundle
59-
run: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
60-
- name: create empty local.properties
61-
run: touch android/local.properties
62-
- name: build debug apk
63-
run: cd android && ./gradlew assembleDebug
64-
- name: upload non tags for debug purposes
45+
- name: Get short Git hash
46+
run: echo "SHORT_GIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
47+
- name: Build debug apk
48+
run: ./gradlew --no-daemon assembleDebug -PversionName="ci-${SHORT_GIT_SHA}"
49+
- name: Upload non tags for debug purposes
6550
uses: actions/upload-artifact@v4
6651
with:
6752
name: debug-apk
68-
path: android/app/build/outputs/apk/debug/app-debug.apk
53+
path: app/build/outputs/apk/debug/app-debug.apk
6954
retention-days: 1

.github/workflows/test.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.gitignore

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,17 @@ buck-out/
6868

6969
src/utils/graphql/*
7070

71-
android/netbird/*.aar
72-
android/netbird/*.jar
73-
android/netbird/build/
74-
android/tool/*.aar
75-
android/tool/*.jar
76-
android/tool/build/
77-
android/app/src/main/assets/index.android.bundle
78-
android/app/src/main/res/drawable-*/src_*
79-
android/app/src/main/res/drawable-*/node_modules_*
71+
app/*.aar
72+
app/*.jar
73+
app/build/
74+
gomobile/build/
75+
gomobile/*.aar
76+
gomobile/*.jar
77+
tool/*.aar
78+
tool/*.jar
79+
tool/build/
80+
app/src/main/assets/index.android.bundle
81+
app/src/main/res/drawable-*/src_*
82+
app/src/main/res/drawable-*/node_modules_*
8083
google-services.json
8184
lefthook.yml

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "netbird"]
2+
path = netbird
3+
url = https://github.com/netbirdio/netbird.git

.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

Gemfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)