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 { ...@@ -22,6 +22,7 @@ dependencies {
ext { ext {
abi = System.getenv('ANDROID_ABI') abi = System.getenv('ANDROID_ABI')
installPrefix = System.getenv('INSTALL_PREFIX')
} }
task ("configure") { task ("configure") {
...@@ -30,7 +31,6 @@ task ("configure") { ...@@ -30,7 +31,6 @@ task ("configure") {
logger.error('ANDROID_ABI not specified using the default one instead: armeabi-7a') logger.error('ANDROID_ABI not specified using the default one instead: armeabi-7a')
} }
def installPrefix = System.getenv('INSTALL_PREFIX')
if (installPrefix == null) { if (installPrefix == null) {
throw new GradleException('Please set INSTALL_PREFIX to the location where binaries are installed') throw new GradleException('Please set INSTALL_PREFIX to the location where binaries are installed')
} }
...@@ -45,13 +45,13 @@ task ("configure") { ...@@ -45,13 +45,13 @@ task ("configure") {
// copy libs(plugins) which start with krita*.so and rename // copy libs(plugins) which start with krita*.so and rename
// them to start with `lib_` // them to start with `lib_`
task copyLibs(type: Copy) { task copyLibs(type: Copy) {
from "${System.getenv('INSTALL_PREFIX')}/lib" from "$installPrefix/lib"
into "libs/${abi ?: 'armeabi-v7a'}" into "libs/${abi ?: 'armeabi-v7a'}"
rename ('^krita(.*).so$', 'lib_krita$1.so') rename ('^krita(.*).so$', 'lib_krita$1.so')
} }
task copyAssets(type: Copy) { task copyAssets(type: Copy) {
from "${System.getenv('INSTALL_PREFIX')}/share/" from "$installPrefix/share/"
into 'assets/' into 'assets/'
include '**' 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