| @@ -18,10 +18,8 @@ configurations: | |||||
| gradle-version: "8.2.1" | gradle-version: "8.2.1" | ||||
| - kotlin-version: "1.8.0" | - kotlin-version: "1.8.0" | ||||
| gradle-version: "7.0" | |||||
| - kotlin-version: "1.7.20" | - kotlin-version: "1.7.20" | ||||
| gradle-version: "8.2.1" | |||||
| packages: | packages: | ||||
| org.slf4j:slf4j-api: "2.0.7" | org.slf4j:slf4j-api: "2.0.7" | ||||
| @@ -30,7 +28,6 @@ configurations: | |||||
| # | # | ||||
| # Most packages should be placed here. | # Most packages should be placed here. | ||||
| - kotlin-version: "1.8.20" | - kotlin-version: "1.8.20" | ||||
| gradle-version: "8.2.1" | |||||
| plugins: | plugins: | ||||
| org.panteleyev.jpackageplugin: "1.5.2" | org.panteleyev.jpackageplugin: "1.5.2" | ||||
| packages: | packages: | ||||
| @@ -50,7 +50,7 @@ if [ $? -lt 30 ]; then | |||||
| version=$(basename "${path}") | version=$(basename "${path}") | ||||
| gradle_path=${GRADLE_VERSIONS_DIR}/gradle-${version} | gradle_path=${GRADLE_VERSIONS_DIR}/gradle-${version} | ||||
| if [[ "${version}" -eq "${GRADLE_VERSION}" ]]; then | |||||
| if [[ "${version}" == "${GRADLE_VERSION}" ]] || [[ "${version}" == "default" ]]; then | |||||
| gradle_path=${GRADLE_HOME} | gradle_path=${GRADLE_HOME} | ||||
| elif [[ ! -d "${gradle_path}" ]]; then | elif [[ ! -d "${gradle_path}" ]]; then | ||||
| echo "Downloading gradle ${version}" | echo "Downloading gradle ${version}" | ||||
| @@ -12,7 +12,7 @@ logger = logging.getLogger(__name__) | |||||
| class Configuration: | class Configuration: | ||||
| name: str | name: str | ||||
| kotlin_version: str | kotlin_version: str | ||||
| gradle_version: str | |||||
| gradle_version: Optional[str] | |||||
| plugins: dict[str, str] | plugins: dict[str, str] | ||||
| packages: list[str] | packages: list[str] | ||||
| @@ -89,8 +89,7 @@ def parse_config(path: Path) -> Optional[Config]: | |||||
| if (kotlin_version := section.get('kotlin-version')) is None: | if (kotlin_version := section.get('kotlin-version')) is None: | ||||
| error.append(f"Configuration {i} is missing 'kotlin-version'") | error.append(f"Configuration {i} is missing 'kotlin-version'") | ||||
| if (gradle_version := section.get('gradle-version')) is None: | |||||
| error.append(f"Configuration {i} is missing 'gradle-version'") | |||||
| gradle_version = section.get('gradle-version') | |||||
| plugins = handle_plugins(section.get('plugins', {})) | plugins = handle_plugins(section.get('plugins', {})) | ||||
| packages = handle_packages(section.get('packages', {})) | packages = handle_packages(section.get('packages', {})) | ||||
| @@ -17,7 +17,8 @@ async def resolve_kotlin(ident: str, configuration: Configuration, output_dir: P | |||||
| for resolved in await get_effective_packages(package, mirrors) | for resolved in await get_effective_packages(package, mirrors) | ||||
| ] | ] | ||||
| path = output_dir / f"{configuration.gradle_version}/{ident}-kotlin-{configuration.kotlin_version}" | |||||
| gradle_path = configuration.gradle_version or "default" | |||||
| path = output_dir / f"{gradle_path}/{ident}-kotlin-{configuration.kotlin_version}" | |||||
| path.mkdir(parents=True) | path.mkdir(parents=True) | ||||
| logger.debug(f'Creating {path}') | logger.debug(f'Creating {path}') | ||||