Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
233c5013
Unverified
Commit
233c5013
authored
Feb 04, 2022
by
Nikolay Igotti
Committed by
GitHub
Feb 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix local Android build (#474)
* Fix local Android build * Tweaks
parent
b43c8fbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
build.gradle.kts
skiko/build.gradle.kts
+8
-9
CompileSkikoCppTask.kt
skiko/buildSrc/src/main/kotlin/CompileSkikoCppTask.kt
+4
-4
No files found.
skiko/build.gradle.kts
View file @
233c5013
...
@@ -717,15 +717,14 @@ fun Project.androidClangFor(targetArch: Arch, version: String = "30"): Provider<
...
@@ -717,15 +717,14 @@ fun Project.androidClangFor(targetArch: Arch, version: String = "30"): Provider<
.
orEmpty
()
.
orEmpty
()
.
map
{
ndkHomeEnv
->
.
map
{
ndkHomeEnv
->
ndkHomeEnv
.
ifEmpty
{
ndkHomeEnv
.
ifEmpty
{
androidHomePath
().
map
{
androidHome
->
val
androidHome
=
androidHomePath
().
get
()
val
ndkDir1
=
file
(
"$androidHome/ndk"
)
val
ndkDir1
=
file
(
"$androidHome/ndk"
)
val
candidates1
=
if
(
ndkDir1
.
exists
())
ndkDir1
.
list
()
else
emptyArray
()
val
candidates1
=
if
(
ndkDir1
.
exists
())
ndkDir1
.
list
()
else
emptyArray
()
val
ndkVersion
=
val
ndkVersion
=
arrayOf
(*(
candidates1
.
map
{
"ndk/$it"
}.
sortedDescending
()).
toTypedArray
(),
"ndk-bundle"
).
find
{
arrayOf
(*(
candidates1
.
map
{
"ndk/$it"
}.
sortedDescending
()).
toTypedArray
(),
"ndk-bundle"
).
find
{
File
(
androidHome
).
resolve
(
it
).
exists
()
File
(
androidHome
).
resolve
(
it
).
exists
()
}
?:
throw
GradleException
(
"Cannot find NDK, is it installed (Tools/SDK Manager)?"
)
}
?:
throw
GradleException
(
"Cannot find NDK, is it installed (Tools/SDK Manager)?"
)
"$androidHome/$ndkVersion"
"$androidHome/$ndkVersion"
}
}
}
}
}
return
ndkPath
.
map
{
ndkPath
->
return
ndkPath
.
map
{
ndkPath
->
...
...
skiko/buildSrc/src/main/kotlin/CompileSkikoCppTask.kt
View file @
233c5013
...
@@ -181,17 +181,17 @@ abstract class CompileSkikoCppTask() : AbstractSkikoNativeToolTask() {
...
@@ -181,17 +181,17 @@ abstract class CompileSkikoCppTask() : AbstractSkikoNativeToolTask() {
}
}
private
fun
findCompilerExecutable
():
File
{
private
fun
findCompilerExecutable
():
File
{
val
compilerName
OrFile
=
compiler
.
get
()
val
compilerName
=
compiler
.
get
()
val
compilerFile
=
File
(
compilerName
OrFile
)
val
compilerFile
=
File
(
compilerName
)
if
(
compilerFile
.
isFile
)
return
compilerFile
if
(
compilerFile
.
isFile
)
return
compilerFile
val
paths
=
System
.
getenv
(
"PATH"
).
split
(
File
.
pathSeparator
)
val
paths
=
System
.
getenv
(
"PATH"
).
split
(
File
.
pathSeparator
)
for
(
path
in
paths
)
{
for
(
path
in
paths
)
{
val
file
=
File
(
path
).
resolve
(
compilerName
OrFile
)
val
file
=
File
(
path
).
resolve
(
compilerName
)
if
(
file
.
isFile
)
return
file
if
(
file
.
isFile
)
return
file
}
}
error
(
"Could not find compiler '$compilerName
OrFile
' in PATH: $paths"
)
error
(
"Could not find compiler '$compilerName' in PATH: $paths"
)
}
}
override
fun
cleanStaleOutput
(
mode
:
ToolMode
.
NonIncremental
)
{
override
fun
cleanStaleOutput
(
mode
:
ToolMode
.
NonIncremental
)
{
...
...
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