forked from MeloNX/MeloNX
Make stripSymbols a gradle property
This commit is contained in:
parent
dd31c40f4e
commit
4728c1e96c
@ -25,5 +25,11 @@ android.nonTransitiveRClass=true
|
|||||||
# It needs to be set to either "debug" or "release" and can also be overriden on a per build basis
|
# It needs to be set to either "debug" or "release" and can also be overriden on a per build basis
|
||||||
# by adding -Dorg.ryujinx.config=NAME to the command line.
|
# by adding -Dorg.ryujinx.config=NAME to the command line.
|
||||||
org.ryujinx.config=debug
|
org.ryujinx.config=debug
|
||||||
# Output path of libRyujinx.so
|
# Controls stripping of symbols from libryujinx
|
||||||
|
# Setting this property to auto causes symbols to be stripped for release builds,
|
||||||
|
# but not for debug builds.
|
||||||
|
# Valid values are: ["auto", "-1", "true", "1", "false", "0"]
|
||||||
|
# Default: auto
|
||||||
|
org.ryujinx.symbols.strip=auto
|
||||||
|
# Output path of libryujinx.so
|
||||||
org.ryujinx.publish.path=app/src/main/jniLibs/arm64-v8a
|
org.ryujinx.publish.path=app/src/main/jniLibs/arm64-v8a
|
@ -14,13 +14,21 @@ def publishDirectory = providers.gradleProperty("org.ryujinx.publish.path").getO
|
|||||||
// Should the symbols be stripped from the published library?
|
// Should the symbols be stripped from the published library?
|
||||||
// Per default the symbols will be stripped for release builds, but not for debug builds.
|
// Per default the symbols will be stripped for release builds, but not for debug builds.
|
||||||
// This can be overridden using this property.
|
// This can be overridden using this property.
|
||||||
// Valid values are: ["true", "1", "false", "0"]
|
// Valid values are: ["auto", "-1", "true", "1", "false", "0"]
|
||||||
def stripSymbols = false
|
def stripSymbols = providers.gradleProperty("org.ryujinx.symbols.strip").getOrElse("")
|
||||||
if (project.hasProperty("org.ryujinx.symbols.strip")) {
|
//noinspection GroovyFallthrough
|
||||||
stripSymbols = project.property("org.ryujinx.symbols.strip") == "true" || project.property("org.ryujinx.symbols.strip") == "1"
|
switch (stripSymbols) {
|
||||||
}
|
case "true":
|
||||||
else {
|
case "1":
|
||||||
stripSymbols = configuration == "release"
|
stripSymbols = true
|
||||||
|
break
|
||||||
|
case "false":
|
||||||
|
case "0":
|
||||||
|
stripSymbols = false
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
stripSymbols = configuration == "release"
|
||||||
|
break
|
||||||
}
|
}
|
||||||
// Additional arguments for the dotnet publish command.
|
// Additional arguments for the dotnet publish command.
|
||||||
def additionalArgs = project.hasProperty("org.ryujinx.args") ? project.property("org.ryujinx.args") : ""
|
def additionalArgs = project.hasProperty("org.ryujinx.args") ? project.property("org.ryujinx.args") : ""
|
||||||
@ -55,6 +63,13 @@ tasks.register('compileLibRyujinx', Exec) {
|
|||||||
environment "PATH", "${toolchainPath}:${providers.environmentVariable("PATH").get()}"
|
environment "PATH", "${toolchainPath}:${providers.environmentVariable("PATH").get()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
doFirst {
|
||||||
|
println "Building LibRyujinx in ${configuration} mode."
|
||||||
|
println "Configuration:"
|
||||||
|
println "\tStripSymbols: ${stripSymbols}"
|
||||||
|
println "\tadditional args: ${additionalArgs.split(" ")}"
|
||||||
|
}
|
||||||
|
|
||||||
executable 'dotnet'
|
executable 'dotnet'
|
||||||
args 'publish',
|
args 'publish',
|
||||||
'-r', 'linux-bionic-arm64',
|
'-r', 'linux-bionic-arm64',
|
||||||
@ -72,6 +87,7 @@ tasks.register('compileLibRyujinx', Exec) {
|
|||||||
include '*.so'
|
include '*.so'
|
||||||
into publishDirectory
|
into publishDirectory
|
||||||
rename (String originalName) -> originalName.toLowerCase()
|
rename (String originalName) -> originalName.toLowerCase()
|
||||||
|
duplicatesStrategy 'include'
|
||||||
preserve {
|
preserve {
|
||||||
include '.*'
|
include '.*'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user