Commit 3a920c7f authored by Sharaf Zaman's avatar Sharaf Zaman

Use ext properties to avoid duplication

Maniphest: T10784
parent a03ef075
......@@ -22,6 +22,7 @@ dependencies {
ext {
abi = System.getenv('ANDROID_ABI')
installPrefix = System.getenv('INSTALL_PREFIX')
}
task ("configure") {
......@@ -30,7 +31,6 @@ task ("configure") {
logger.error('ANDROID_ABI not specified using the default one instead: armeabi-7a')
}
def installPrefix = System.getenv('INSTALL_PREFIX')
if (installPrefix == null) {
throw new GradleException('Please set INSTALL_PREFIX to the location where binaries are installed')
}
......@@ -45,13 +45,13 @@ task ("configure") {
// copy libs(plugins) which start with krita*.so and rename
// them to start with `lib_`
task copyLibs(type: Copy) {
from "${System.getenv('INSTALL_PREFIX')}/lib"
from "$installPrefix/lib"
into "libs/${abi ?: 'armeabi-v7a'}"
rename ('^krita(.*).so$', 'lib_krita$1.so')
}
task copyAssets(type: Copy) {
from "${System.getenv('INSTALL_PREFIX')}/share/"
from "$installPrefix/share/"
into 'assets/'
include '**'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment