Commit 01ad72b7 authored by Drahomír Karchňák's avatar Drahomír Karchňák

Fixed boolean value checks for gradle properties.

parent 69bcc54b
......@@ -212,7 +212,7 @@ task prepareHdAssets(dependsOn: prepareAssets) {
outputs.dir("${buildDir}/${assetsDirName}/${assetsHdDirName}/${assetsSourceDirName}/")
doLast {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(TABLEXIA_HD_ASSETS).booleanValue()) {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) {
new File("${assetsDir}/${assetsSourceDirName}/").eachDir() { langDir ->
langDir.eachDir() { sectionDir ->
......@@ -338,7 +338,7 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) {
outputs.dir("${assetsDir.absolutePath}/${assetsDestinationDirName}/")
doLast {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(TABLEXIA_HD_ASSETS).booleanValue()) {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) {
TexturePacker.Settings settings = new TexturePacker.Settings();
settings.pot = false;
settings.maxWidth = 2048;
......@@ -396,7 +396,7 @@ task prepareHdGraphicAssets(dependsOn: prepareHdAssets) {
task zipHdAssets(dependsOn: prepareHdGraphicAssets) {
doLast {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(TABLEXIA_HD_ASSETS).booleanValue()) {
if (project.hasProperty('TABLEXIA_HD_ASSETS') && Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) {
new File(project(":core").projectDir.absolutePath + "/${assetsDirName}/").eachDir() { dir ->
if (!dir.name.equals('common')) {
......@@ -415,7 +415,7 @@ task zipHdAssets(dependsOn: prepareHdGraphicAssets) {
task processAssets(dependsOn: [':util:checksum:runChecksum', ':util:checksum:runAssetsArchivesChecksum']) {
doLast {
if (project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD') && Boolean.valueOf(TABLEXIA_ASSETS_UPLOAD).booleanValue()) {
if (project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') && project.hasProperty('TABLEXIA_ASSETS_UPLOAD') && Boolean.valueOf(project.property('TABLEXIA_ASSETS_UPLOAD')).booleanValue()) {
def data = new URL(project.assetsDownloadUrl).getText()
rootProject.ext.assetsPackDir.eachFile() { file ->
String fileName = file.getName()
......@@ -450,8 +450,8 @@ task prepareHdPack(dependsOn: [':util:checksum:runHdChecksum', ':util:checksum:r
project.hasProperty('TABLEXIA_ASSETS_UPLOAD_USER') &&
project.hasProperty('TABLEXIA_ASSETS_UPLOAD_URL') &&
project.hasProperty('TABLEXIA_ASSETS_UPLOAD') &&
Boolean.valueOf(TABLEXIA_ASSETS_UPLOAD).booleanValue() &&
Boolean.valueOf(TABLEXIA_HD_ASSETS).booleanValue()) {
Boolean.valueOf(project.property('TABLEXIA_ASSETS_UPLOAD')).booleanValue() &&
Boolean.valueOf(project.property('TABLEXIA_HD_ASSETS')).booleanValue()) {
def data = new URL(project.assetsDownloadUrl).getText()
rootProject.ext.assetsHdPackDir.eachFile() { file ->
......@@ -560,7 +560,7 @@ def getBranchNameFromGit() {
}
boolean isReleaseBuild() {
return project.hasProperty('TABLEXIA_RELEASE_BUILD') && project.property('TABLEXIA_RELEASE_BUILD').asBoolean()
return project.hasProperty('TABLEXIA_RELEASE_BUILD') && Boolean.valueOf(project.property('TABLEXIA_RELEASE_BUILD')).booleanValue()
}
def getMapConvertedToString(Map map) {
......
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