Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bpresles
Cesium
Commits
56284c10
Commit
56284c10
authored
5 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Android build: use ~/Android/Sdk if exists
parent
46edb838
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/env-global.sh
+19
-7
19 additions, 7 deletions
scripts/env-global.sh
scripts/install-android-sdk-tools.sh
+2
-0
2 additions, 0 deletions
scripts/install-android-sdk-tools.sh
with
21 additions
and
7 deletions
scripts/env-global.sh
+
19
−
7
View file @
56284c10
...
@@ -39,8 +39,6 @@ DIST_ANDROID=${PROJECT_DIR}/dist/android
...
@@ -39,8 +39,6 @@ DIST_ANDROID=${PROJECT_DIR}/dist/android
GRADLE_VERSION
=
4.10.3
GRADLE_VERSION
=
4.10.3
CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL
=
https
\:
//services.gradle.org/distributions/gradle-
${
GRADLE_VERSION
}
-all
.zip
CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL
=
https
\:
//services.gradle.org/distributions/gradle-
${
GRADLE_VERSION
}
-all
.zip
# Export Android SDK tools to path
export
PATH
=
${
ANDROID_SDK_TOOLS_ROOT
}
/bin:
$PATH
# Override with a local file, if any
# Override with a local file, if any
if
[[
-f
"
${
PROJECT_DIR
}
/.local/env.sh"
]]
;
then
if
[[
-f
"
${
PROJECT_DIR
}
/.local/env.sh"
]]
;
then
...
@@ -75,14 +73,28 @@ if [[ "_" == "_${JAVA_HOME}" ]]; then
...
@@ -75,14 +73,28 @@ if [[ "_" == "_${JAVA_HOME}" ]]; then
fi
fi
fi
fi
# Checking Android SDK
# Check Android SDK root path
DEFAULT_ANDROID_SDK_ROOT
=
$(
test
-d
~/Android/Sdk
&&
cd
~/Android/Sdk
&&
pwd
)
if
[[
"_"
==
"_
${
ANDROID_SDK_ROOT
}
"
]]
;
then
if
[[
"_"
==
"_
${
ANDROID_SDK_ROOT
}
"
]]
;
then
echo
"Please set env variable ANDROID_SDK_ROOT "
if
[[
-d
"
${
DEFAULT_ANDROID_SDK_ROOT
}
"
]]
;
then
exit
1
ANDROID_SDK_ROOT
=
"
${
DEFAULT_ANDROID_SDK_ROOT
}
"
else
echo
"Please set env variable ANDROID_SDK_ROOT"
exit
1
fi
fi
fi
if
[[
!
-d
"
${
ANDROID_SDK_ROOT
}
"
]]
;
then
if
[[
!
-d
"
${
ANDROID_SDK_ROOT
}
"
]]
;
then
echo
"Invalid path for ANDROID_SDK_ROOT:
${
ANDROID_SDK_ROOT
}
is not a directory"
if
[[
!
-d
"
${
ANDROID_SDK_ROOT
}
"
]]
;
then
exit
1
ANDROID_SDK_ROOT
=
"
${
DEFAULT_ANDROID_SDK_ROOT
}
"
else
echo
"Invalid path for ANDROID_SDK_ROOT:
${
ANDROID_SDK_ROOT
}
is not a directory"
exit
1
fi
fi
# Export Android SDK tools to path
if
[[
-d
"
${
ANDROID_SDK_TOOLS_ROOT
}
/bin"
]]
;
then
export
PATH
=
${
ANDROID_SDK_TOOLS_ROOT
}
/bin:
$PATH
fi
fi
# Export useful variables
# Export useful variables
...
...
This diff is collapsed.
Click to expand it.
scripts/install-android-sdk-tools.sh
+
2
−
0
View file @
56284c10
...
@@ -11,6 +11,8 @@ if [[ ! -d "${ANDROID_SDK_TOOLS_ROOT}/bin" ]]; then
...
@@ -11,6 +11,8 @@ if [[ ! -d "${ANDROID_SDK_TOOLS_ROOT}/bin" ]]; then
test
-e
"
${
ANDROID_SDK_TOOLS_ROOT
}
"
&&
rm
"sdk-tools-linux-
${
ANDROID_SDK_TOOLS_VERSION
}
.zip"
test
-e
"
${
ANDROID_SDK_TOOLS_ROOT
}
"
&&
rm
"sdk-tools-linux-
${
ANDROID_SDK_TOOLS_VERSION
}
.zip"
fi
fi
export
PATH
=
${
ANDROID_SDK_TOOLS_ROOT
}
/bin:
$PATH
mkdir
-p
${
ANDROID_SDK_ROOT
}
/licenses
mkdir
-p
${
ANDROID_SDK_ROOT
}
/licenses
echo
8933bad161af4178b1185d1a37fbf41ea5269c55
>
${
ANDROID_SDK_ROOT
}
/licenses/android-sdk-license
echo
8933bad161af4178b1185d1a37fbf41ea5269c55
>
${
ANDROID_SDK_ROOT
}
/licenses/android-sdk-license
echo
601085b94cd77f0b54ff86406957099ebe79c4d6
>
${
ANDROID_SDK_ROOT
}
/licenses/android-googletv-license
echo
601085b94cd77f0b54ff86406957099ebe79c4d6
>
${
ANDROID_SDK_ROOT
}
/licenses/android-googletv-license
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment