⁠
rednesto: Bump templates
Copy
Copy
- {
- "version": 1,
- "group": "plugin",
- "properties": [
- {
- "name": "BUILD_COORDS",
- "type": "build_system_coordinates",
- "order": 10
- },
- {
- "name": "BUILD_SYSTEM",
- "type": "string",
- "options": [
- "Gradle",
- "Maven"
- ]
- },
- {
- "name": "LANGUAGE",
- "type": "string",
- "options": [
- "Java",
- "Kotlin"
- ]
- },
- {
- "name": "SPONGEAPI_VERSION",
- "type": "semantic_version",
- "forceDropdown": true,
- "options": [
- "12.0.0-SNAPSHOT",
- "11.0.0-SNAPSHOT",
- "10.1.0-SNAPSHOT",
- "10.0.0",
- "9.1.0-SNAPSHOT",
- "9.0.0",
- "8.3.0-SNAPSHOT",
- "8.2.0"
- ],
- "default": 1
- },
- {
- "name": "KOTLIN_VERSION",
- "type": "maven_artifact_version",
- "parameters": {
- "sourceUrl": "https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/maven-metadata.xml"
- },
- "visible": {
- "dependsOn": ["LANGUAGE"],
- "condition": "$LANGUAGE == 'Kotlin'"
- }
- },
- {
- "name": "PLUGIN_ID",
- "type": "string",
- "validator": "[a-z][a-z0-9-_]{1,63}",
- "derives": {
- "parents": ["PROJECT_NAME"],
- "method": "replace",
- "parameters": {
- "regex": "[^a-z0-9-_]+",
- "replacement": "_",
- "maxLength": 64
- }
- }
- },
- {
- "name": "PLUGIN_NAME",
- "type": "string",
- "inheritFrom": "PROJECT_NAME"
- },
- {
- "name": "MAIN_CLASS",
- "type": "class_fqn",
- "derives": {
- "parents": ["BUILD_COORDS", "PLUGIN_ID"],
- "method": "suggestClassName"
- }
- },
- {
- "name": "LICENSE",
- "type": "license"
- },
- {
- "label": "creator.ui.optional_settings.label",
- "collapsible": true,
- "groupProperties": [
- {
- "name": "DESCRIPTION",
- "type": "string",
- "default": "",
- "nullIfDefault": true
- },
- {
- "name": "AUTHORS",
- "type": "inline_string_list",
- "default": "",
- "nullIfDefault": true
- },
- {
- "name": "WEBSITE",
- "type": "string",
- "default": "",
- "nullIfDefault": true
- }
- ]
- },
- {
- "name": "JAVA_VERSION",
- "type": "integer",
- "order": 20,
- "default": 17,
- "visible": false,
- "derives": {
- "parents": ["SPONGEAPI_VERSION"],
- "select": [
- {
- "condition": "$SPONGEAPI_VERSION.compareTo($semver.release(11)) >= 0",
- "value": 21
- },
- {
- "condition": "$SPONGEAPI_VERSION.compareTo($semver.release(9)) >= 0",
- "value": 17
- },
- {
- "condition": "$SPONGEAPI_VERSION.compareTo($semver.release(8)) >= 0",
- "value": 16
- }
- ],
- "default": 17
- }
- },
- {
- "name": "JDK",
- "type": "jdk",
- "order": 20,
- "default": "JAVA_VERSION"
- }
- ],
- "files": [
- {
- "template": "../${BUILD_SYSTEM}.gitignore.ft",
- "destination": ".gitignore",
- "condition": "$USE_GIT"
- },
- {
- "template": "build.gradle.kts.ft",
- "destination": "build.gradle.kts",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "template": "settings.gradle.kts.ft",
- "destination": "settings.gradle.kts",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "template": "gradle.properties.ft",
- "destination": "gradle.properties",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "template": "../gradle-wrapper.properties.ft",
- "destination": "gradle/wrapper/gradle-wrapper.properties",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "template": "pom.xml.ft",
- "destination": "pom.xml",
- "condition": "$BUILD_SYSTEM=='Maven'"
- },
- {
- "template": "sponge_plugins.json.ft",
- "destination": "src/main/resources/META-INF/sponge_plugins.json",
- "condition": "$BUILD_SYSTEM=='Maven'"
- },
- {
- "template": "MainClass.java.ft",
- "destination": "src/main/java/${MAIN_CLASS.path}.java",
- "condition": "$LANGUAGE=='Java'",
- "openInEditor": true
- },
- {
- "template": "MainClass.kt.ft",
- "destination": "src/main/kotlin/${MAIN_CLASS.path}.kt",
- "condition": "$LANGUAGE=='Kotlin'",
- "openInEditor": true
- }
- ],
- "finalizers": [
- {
- "type": "import_maven_project",
- "condition": "$BUILD_SYSTEM=='Maven'"
- },
- {
- "type": "import_gradle_project",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "type": "run_gradle_tasks",
- "tasks": ["wrapper"],
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "type": "git_add_all",
- "condition": "$USE_GIT"
- }
- ]
- }
- {
- "version": 1,
- "group": "plugin",
- "properties": [
- {
- "name": "BUILD_COORDS",
- "type": "build_system_coordinates",
- "order": 10
- },
- {
- "name": "BUILD_SYSTEM",
- "type": "string",
- "options": [
- "Gradle",
- "Maven"
- ]
- },
- {
- "name": "LANGUAGE",
- "type": "string",
- "options": [
- "Java",
- "Kotlin"
- ]
- },
- {
- "name": "SPONGEAPI_VERSION",
- "type": "semantic_version",
- "forceDropdown": true,
- "options": [
- "12.0.0-SNAPSHOT",
- "11.0.0-SNAPSHOT",
- "10.1.0-SNAPSHOT",
- "10.0.0",
- "9.1.0-SNAPSHOT",
- "9.0.0",
- "8.3.0-SNAPSHOT",
- "8.2.0"
- ],
- "default": 1
- },
- {
- "name": "KOTLIN_VERSION",
- "type": "maven_artifact_version",
- "parameters": {
- "sourceUrl": "https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/maven-metadata.xml"
- },
- "visible": {
- "dependsOn": ["LANGUAGE"],
- "condition": "$LANGUAGE == 'Kotlin'"
- }
- },
- {
- "name": "PLUGIN_ID",
- "type": "string",
- "validator": "[a-z][a-z0-9-_]{1,63}",
- "derives": {
- "parents": ["PROJECT_NAME"],
- "method": "replace",
- "parameters": {
- "regex": "[^a-z0-9-_]+",
- "replacement": "_",
- "maxLength": 64,
- "lowercase": true
- }
- }
- },
- {
- "name": "PLUGIN_NAME",
- "type": "string",
- "inheritFrom": "PROJECT_NAME"
- },
- {
- "name": "MAIN_CLASS",
- "type": "class_fqn",
- "derives": {
- "parents": ["BUILD_COORDS", "PLUGIN_ID"],
- "method": "suggestClassName"
- }
- },
- {
- "name": "LICENSE",
- "type": "license"
- },
- {
- "label": "creator.ui.optional_settings.label",
- "collapsible": true,
- "groupProperties": [
- {
- "name": "DESCRIPTION",
- "type": "string",
- "default": "",
- "nullIfDefault": true
- },
- {
- "name": "AUTHORS",
- "type": "inline_string_list",
- "default": "",
- "nullIfDefault": true
- },
- {
- "name": "WEBSITE",
- "type": "string",
- "default": "",
- "nullIfDefault": true
- }
- ]
- },
- {
- "name": "JAVA_VERSION",
- "type": "integer",
- "order": 20,
- "default": 17,
- "visible": false,
- "derives": {
- "parents": ["SPONGEAPI_VERSION"],
- "select": [
- {
- "condition": "$SPONGEAPI_VERSION.compareTo($semver.release(11)) >= 0",
- "value": 21
- },
- {
- "condition": "$SPONGEAPI_VERSION.compareTo($semver.release(9)) >= 0",
- "value": 17
- },
- {
- "condition": "$SPONGEAPI_VERSION.compareTo($semver.release(8)) >= 0",
- "value": 16
- }
- ],
- "default": 17
- }
- },
- {
- "name": "JDK",
- "type": "jdk",
- "order": 20,
- "default": "JAVA_VERSION"
- }
- ],
- "files": [
- {
- "template": "../${BUILD_SYSTEM}.gitignore.ft",
- "destination": ".gitignore",
- "condition": "$USE_GIT"
- },
- {
- "template": "build.gradle.kts.ft",
- "destination": "build.gradle.kts",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "template": "settings.gradle.kts.ft",
- "destination": "settings.gradle.kts",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "template": "gradle.properties.ft",
- "destination": "gradle.properties",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "template": "../gradle-wrapper.properties.ft",
- "destination": "gradle/wrapper/gradle-wrapper.properties",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "template": "pom.xml.ft",
- "destination": "pom.xml",
- "condition": "$BUILD_SYSTEM=='Maven'"
- },
- {
- "template": "sponge_plugins.json.ft",
- "destination": "src/main/resources/META-INF/sponge_plugins.json",
- "condition": "$BUILD_SYSTEM=='Maven'"
- },
- {
- "template": "MainClass.java.ft",
- "destination": "src/main/java/${MAIN_CLASS.path}.java",
- "condition": "$LANGUAGE=='Java'",
- "openInEditor": true
- },
- {
- "template": "MainClass.kt.ft",
- "destination": "src/main/kotlin/${MAIN_CLASS.path}.kt",
- "condition": "$LANGUAGE=='Kotlin'",
- "openInEditor": true
- }
- ],
- "finalizers": [
- {
- "type": "import_maven_project",
- "condition": "$BUILD_SYSTEM=='Maven'"
- },
- {
- "type": "import_gradle_project",
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "type": "run_gradle_tasks",
- "tasks": ["wrapper"],
- "condition": "$BUILD_SYSTEM=='Gradle'"
- },
- {
- "type": "git_add_all",
- "condition": "$USE_GIT"
- }
- ]
- }