diff --git a/src/icmtoolchain/builtin_tasks.py b/src/icmtoolchain/builtin_tasks.py index eeb2866..8d6cf14 100644 --- a/src/icmtoolchain/builtin_tasks.py +++ b/src/icmtoolchain/builtin_tasks.py @@ -49,9 +49,7 @@ def task_compile_java(tool: Optional[str] = None) -> int: from .java_build import compile_java if not tool: tool = GLOBALS.MAKE_CONFIG.get_value("java.compiler", "gradle") - if not tool: - return 1 - if not tool == "gradle" and GLOBALS.MAKE_CONFIG.get_value("java.configurable", False): + if tool != "gradle" and GLOBALS.MAKE_CONFIG.get_value("java.configurable", False): attention("Project uses configurable Gradle, different tools cannot be applied.") tool = "gradle" return compile_java(tool) @@ -78,7 +76,6 @@ def task_compile_native() -> int: if len(abis) == 0: abis = GLOBALS.MAKE_CONFIG.obtain_list("abis") if len(abis) == 0: - attention(f"No `abis` value in 'toolchain.json' config, using defaults otherwise.") abis = ["arm64-v8a", "armeabi-v7a"] from .native_build import compile_native, copy_shared_objects result = compile_native(abis) diff --git a/src/icmtoolchain/includes.py b/src/icmtoolchain/includes.py index 7cebdce..b3dc714 100644 --- a/src/icmtoolchain/includes.py +++ b/src/icmtoolchain/includes.py @@ -39,7 +39,7 @@ class Includes: self.decode_line(line.strip(), dependents) for dependent in dependents: if (dependent in GLOBALS.TSCONFIG_DEPENDENTS and GLOBALS.TSCONFIG_DEPENDENTS[dependent] in self.params and self.params[GLOBALS.TSCONFIG_DEPENDENTS[dependent]] == True): - self.params[GLOBALS.TSCONFIG_DEPENDENTS[dependent]] = not self.params[GLOBALS.TSCONFIG_DEPENDENTS[dependent]] + self.params[dependent] = not self.params[dependent] def decode_param(self, key: str, value: Any, dependents: List[str]) -> None: default = GLOBALS.TSCONFIG_TOOLCHAIN[key] if key in GLOBALS.TSCONFIG_TOOLCHAIN else TSCONFIG[key] diff --git a/src/icmtoolchain/java_build.py b/src/icmtoolchain/java_build.py index 6c701ff..4bf8b06 100644 --- a/src/icmtoolchain/java_build.py +++ b/src/icmtoolchain/java_build.py @@ -6,7 +6,7 @@ import subprocess from itertools import tee from os.path import basename, exists, isdir, isfile, join, relpath, splitext from typing import (Collection, Dict, Iterable, List, MutableSequence, - NamedTuple) + NamedTuple, Optional) from zipfile import ZipFile from .config import Config @@ -620,7 +620,7 @@ def build_java_directories(tool: str, directories: Iterable[MakeJavaData], targe GLOBALS.BUILD_STORAGE.save() return result -def compile_java(tool: str = "gradle") -> int: +def compile_java(tool: Optional[str] = "gradle") -> int: if tool not in ("gradle", "javac", "ecj"): failure(f"Java compilation will be cancelled, because tool {tool!r} is not available.") return 255