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

chore(cordova/android): use src/tun2socks, not precompiled third_party version #1816

Merged
merged 7 commits into from
Jan 25, 2024

Conversation

daniellacosse
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (91f7926) 32% compared to head (1576417) 40%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #1816    +/-   ##
=======================================
+ Coverage      32%     40%    +7%     
=======================================
  Files          45      39     -6     
  Lines        2609    1805   -804     
  Branches      337     337            
=======================================
- Hits          859     738   -121     
+ Misses       1750    1067   -683     
Flag Coverage Δ
apple ?
ios ?
maccatalyst ?
macos ?
unittests 40% <ø> (+7%) ⬆️
www 40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daniellacosse daniellacosse marked this pull request as ready for review January 10, 2024 22:02
@daniellacosse daniellacosse requested review from a team as code owners January 10, 2024 22:02
Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

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

Nice!

Makefile Outdated
@@ -20,6 +20,7 @@ android: $(BUILDDIR)/android/tun2socks.aar
$(BUILDDIR)/android/tun2socks.aar: $(GOMOBILE)
mkdir -p "$(BUILDDIR)/android"
$(ANDROID_BUILD_CMD) -o "$@" $(IMPORT_PATH)/$(ROOT_PKG)/outline/tun2socks $(IMPORT_PATH)/$(ROOT_PKG)/outline/shadowsocks
unzip "$@" 'jni/*' -d $(BUILDDIR)/android
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you uncompressing the aar file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, still exploring. Let me set this to draft.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's required for the copy script, for some reason, and removing the copy script silently breaks the build

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe not in this PR, but I think we should use the aar directly in the future. Intra already referenced the aar directly, but I don't know whether Cordova allows you to do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It feels like a Cordova thing, yeah.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@daniellacosse Can you check whether we need to unzip again?

Based on the new fixed build.gradle, it seems we refer to directly to the .aar file, not the extracted files.

@daniellacosse daniellacosse marked this pull request as draft January 11, 2024 14:55
* fix(electron/windows): build windows on linux

* use go build when the target and host platforms match [WIP]

* oops

* scope to electron

* revert windows job changes

* lol ai

* fix path

* resolve current platform
@daniellacosse daniellacosse marked this pull request as ready for review January 23, 2024 16:35
Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

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

Looks good, but let's check the zip thing again.

Makefile Outdated
@@ -20,6 +20,7 @@ android: $(BUILDDIR)/android/tun2socks.aar
$(BUILDDIR)/android/tun2socks.aar: $(GOMOBILE)
mkdir -p "$(BUILDDIR)/android"
$(ANDROID_BUILD_CMD) -o "$@" $(IMPORT_PATH)/$(ROOT_PKG)/outline/tun2socks $(IMPORT_PATH)/$(ROOT_PKG)/outline/shadowsocks
unzip "$@" 'jni/*' -d $(BUILDDIR)/android
Copy link
Collaborator

Choose a reason for hiding this comment

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

@daniellacosse Can you check whether we need to unzip again?

Based on the new fixed build.gradle, it seems we refer to directly to the .aar file, not the extracted files.

@daniellacosse
Copy link
Contributor Author

daniellacosse commented Jan 24, 2024 via email

Makefile Outdated Show resolved Hide resolved
@daniellacosse daniellacosse merged commit 85ce8f8 into master Jan 25, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants