-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathBuild_AAR_Android.bat
More file actions
40 lines (35 loc) · 1.59 KB
/
Build_AAR_Android.bat
File metadata and controls
40 lines (35 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
:: Execute with the current directory as the project root directory
:: This needs JDK 8 to be on the PATH and a maximum Android SDK installed in Android Studio that is compiled with JDK 8,
:: which I think means Android 12 (API level 31) or lower (or might be instead Android 11, API level 30, not sure).
:: BUT... it's possible to use a newer version. In the case of VISOR where I use hidden APIs, I also use a modified
:: android.jar - the modified versions are sometimes compiled or modified to work with JDK 8. Right now I have API 36.
:: This also needs NDK version >= r19c (19.2.5345600) installed on Android Studio (very recent versions may not work. In
:: case just install r19c which will work just fine.
:: Run "go install golang.org/x/mobile/cmd/gomobile@v0.0.0-20240707233753-b765e5d5218f" and
:: "go install golang.org/x/mobile/cmd/gobind@v0.0.0-20240707233753-b765e5d5218f" to install the gomobile tools.
:: Must be the version I wrote - it's the last one supporting Go 1.20 (that I found on WayBackMachine at least).
:: Only put here below the packages that need the exported names visible. The others will be added automatically (if
:: needed?).
:: Keep compressdwarf here. It's default true, but they could change it to default false, so this way it's true for
:: sure.
mkdir bin
gomobile bind^
-tags=client^
-target=android^
-x^
-v^
-ldflags="-v -s -w -compressdwarf=true"^
-o="bin/VISORLibraries.aar"^
"ACD/ACD"^
"DialogMan"^
"GMan"^
"GPTComm"^
"OICComm"^
"SCLink"^
"SettingsSync"^
"SpeechQueue"^
"TEHelper"^
"ULHelper"^
"Utils/ModsFileInfo"^
"Utils/UtilsSWA"
echo Error code: %ERRORLEVEL%