| @@ -23,8 +23,16 @@ def generate_gradle(configuration: Configuration, repo: str, output_dir: Path): | |||||
| def generate_gradle_project(name: str, gradle_path, kotlin: str, plugins: Iterable[Plugin], packages: Iterable[Package], repo: str): | def generate_gradle_project(name: str, gradle_path, kotlin: str, plugins: Iterable[Plugin], packages: Iterable[Package], repo: str): | ||||
| path = gradle_path / name | path = gradle_path / name | ||||
| logger.debug(f'Creating {path}') | |||||
| path.mkdir(parents=True) | |||||
| if path.is_file(): | |||||
| logger.warning(f'{path} already exists as a file. This should not happen. Overwriting.') | |||||
| path.unlink() | |||||
| path.mkdir() | |||||
| elif path.is_dir(): | |||||
| logger.warning(f'{path} already exists. This can indicate an error. Overwriting.') | |||||
| else: | |||||
| logger.info(f'Creating {path}') | |||||
| path.mkdir(parents=True) | |||||
| logger.debug('Generating build.gradle.kts') | logger.debug('Generating build.gradle.kts') | ||||
| gradle_build = generate_gradle_build(kotlin, set(plugins), set(packages), repo) | gradle_build = generate_gradle_build(kotlin, set(plugins), set(packages), repo) | ||||