From 88ef7822b9fccf9958a5a7e3c1c82b47aa814040 Mon Sep 17 00:00:00 2001 From: Mohammed Alteneiji Date: Wed, 1 Apr 2026 12:56:30 +0400 Subject: [PATCH] make an api version --- api/build.gradle.kts | 16 ++++++++++++++ .../api/APIConstantVariables.java.peb | 21 +++++++++++++++++++ gradle.properties | 3 ++- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 api/src/main/java-templates/net/limework/valiobungee/api/APIConstantVariables.java.peb diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 02bef1a..d0c2bca 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -1,5 +1,21 @@ description = "Api functions for valiobungee" +plugins { + alias(libs.plugins.blossom) + alias(libs.plugins.indragit) +} + + +sourceSets { + main { + blossom { + javaSources { + property("apiversion", project.property("api-version").toString()) + } + } + } +} + java { withJavadocJar() withSourcesJar() diff --git a/api/src/main/java-templates/net/limework/valiobungee/api/APIConstantVariables.java.peb b/api/src/main/java-templates/net/limework/valiobungee/api/APIConstantVariables.java.peb new file mode 100644 index 0000000..3012852 --- /dev/null +++ b/api/src/main/java-templates/net/limework/valiobungee/api/APIConstantVariables.java.peb @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2026 ValioBungee contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.limework.valiobungee.api; + +public class APIConstantVariables { + + public static final String API_VERSION = "{{ apiversion }}"; +} diff --git a/gradle.properties b/gradle.properties index f9b9a53..1c6aa28 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,3 @@ group=net.limework -version=1.0.0-SNAPSHOT \ No newline at end of file +version=1.0.0-SNAPSHOT +api-version=v1 \ No newline at end of file