INNER CODE UNIT · Python

adjust_csproj

stratumauth/app · extra/build.py:48

def adjust_csproj(build_dir: str, args: argparse.Namespace):
    project_name = PROJECT_NAMES[args.project]
    csproj_path = os.path.join(build_dir, project_name, f"{project_name}.csproj")
    csproj = ElementTree.parse(csproj_path)

    property_group = csproj.find("PropertyGroup")

    package_format = ElementTree.Element("AndroidPackageFormat")
    package_format.text = args.package
    property_group.append(package_format)

    runtime_identifiers = csproj.findall(".//RuntimeIdentifiers")

    for element in runtime_identifiers:
        element.text = (
            args.runtime
            if args.runtime is not None
            else ";".join(RUNTIME_IDENTIFIERS.keys())

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…