Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
5a26b52b
Commit
5a26b52b
authored
Dec 05, 2017
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build dependency
parent
9fc1a4e0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
9 deletions
+39
-9
core/build.gradle
core/build.gradle
+12
-0
core/src/overture/clean.bash
core/src/overture/clean.bash
+12
-0
core/src/overture/make.bash
core/src/overture/make.bash
+15
-9
No files found.
core/build.gradle
View file @
5a26b52b
...
...
@@ -37,6 +37,18 @@ task goBuild(type: Exec) {
args
"-c"
,
"src/overture/make.bash "
+
minSdkVersion
}
task
goClean
(
type:
Exec
)
{
executable
"sh"
args
"-c"
,
"src/overture/clean.bash"
}
tasks
.
whenTaskAdded
{
task
->
if
(
task
.
name
==
'externalNativeBuildDebug'
||
task
.
name
==
'externalNativeBuildRelease'
)
{
task
.
dependsOn
(
goBuild
)
}
}
dependencies
{
api
project
(
':plugin'
)
testImplementation
"junit:junit:$junitVersion"
...
...
core/src/overture/clean.bash
0 → 100755
View file @
5a26b52b
#!/bin/bash
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
TARGET
=
$DIR
/../main/jni/overture
DEPS
=
$DIR
/.deps
rm
-rf
$DEPS
rm
-rf
$DIR
/go/bin
rm
-rf
$DIR
/bin
rm
-rf
$TARGET
echo
"Successfully clean overture"
core/src/overture/make.bash
View file @
5a26b52b
...
...
@@ -63,19 +63,25 @@ pushd $GOPATH/src/github.com/shadowsocks/overture/main
godep restore
echo
"Cross compile overture for arm"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM_CC
GOOS
=
android
GOARCH
=
arm
GOARM
=
7 go build
-ldflags
=
"-s -w"
try
$ANDROID_ARM_STRIP
main
try
mv
main
$TARGET
/armeabi-v7a/liboverture.so
if
[
!
-f
"
$TARGET
/armeabi-v7a/liboverture.so"
]
;
then
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM_CC
GOOS
=
android
GOARCH
=
arm
GOARM
=
7 go build
-ldflags
=
"-s -w"
try
$ANDROID_ARM_STRIP
main
try
mv
main
$TARGET
/armeabi-v7a/liboverture.so
fi
echo
"Cross compile overture for arm64"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM64_CC
GOOS
=
android
GOARCH
=
arm64 go build
-ldflags
=
"-s -w"
try
$ANDROID_ARM64_STRIP
main
try
mv
main
$TARGET
/arm64-v8a/liboverture.so
if
[
!
-f
"
$TARGET
/arm64-v8a/liboverture.so"
]
;
then
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM64_CC
GOOS
=
android
GOARCH
=
arm64 go build
-ldflags
=
"-s -w"
try
$ANDROID_ARM64_STRIP
main
try
mv
main
$TARGET
/arm64-v8a/liboverture.so
fi
echo
"Cross compile overture for x86"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_X86_CC
GOOS
=
android
GOARCH
=
386 go build
-ldflags
=
"-s -w"
try
$ANDROID_X86_STRIP
main
try
mv
main
$TARGET
/x86/liboverture.so
if
[
!
-f
"
$TARGET
/x86/liboverture.so"
]
;
then
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_X86_CC
GOOS
=
android
GOARCH
=
386 go build
-ldflags
=
"-s -w"
try
$ANDROID_X86_STRIP
main
try
mv
main
$TARGET
/x86/liboverture.so
fi
popd
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment