diff --git a/api/build.gradle b/api/build.gradle index 240edc4..42ac074 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -2,6 +2,8 @@ plugins { id 'com.github.johnrengelman.shadow' version '7.0.0' } +version = MSB3_VERSION + tasks { shadowJar { manifest { @@ -48,3 +50,32 @@ dependencies { implementation 'org.apache.commons:commons-text:1.10.0' } + +publishing { + publications { + maven(MavenPublication) { + groupId = 'ru.dragonestia.msb3' + artifactId = 'msb-api' + version = MSB3_VERSION + + from components.java + } + } + + repositories { + maven { + name = "Gitea" + url = uri(MSB3_MAVEN_REPOSITORY) + allowInsecureProtocol = true + + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "token ${dragonestiaGiteaToken}" + } + + authentication { + header(HttpHeaderAuthentication) + } + } + } +} diff --git a/build.gradle b/build.gradle index 4aac899..22d0991 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,6 @@ subprojects { apply plugin: 'maven-publish' group = 'ru.dragonestia.msb3' - version = '3.0' java { toolchain { diff --git a/editor/build.gradle b/editor/build.gradle index f0a5d38..1987377 100644 --- a/editor/build.gradle +++ b/editor/build.gradle @@ -33,3 +33,7 @@ dependencyManagement { mavenBom "com.vaadin:vaadin-bom:${vaadinVersion}" } } + +sourcesJar.dependsOn({ + vaadinPrepareFrontend +}) diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..9fa5e8d --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +MSB3_MAVEN_REPOSITORY=http://git.dragonestia.ru/api/packages/MSB/maven +MSB3_VERSION=3.0.0 \ No newline at end of file diff --git a/resource-compiler/build.gradle b/resource-compiler/build.gradle index febea5b..75f896e 100644 --- a/resource-compiler/build.gradle +++ b/resource-compiler/build.gradle @@ -1,3 +1,9 @@ +ext { + ext.set("VERSION", '1.0.0') +} + +version = ext.get("VERSION") + dependencies { api 'net.kyori:adventure-api:4.17.0' api 'net.kyori:adventure-text-minimessage:4.17.0' @@ -5,3 +11,32 @@ dependencies { api 'team.unnamed:creative-serializer-minecraft:1.7.3' api 'team.unnamed:creative-server:1.7.3' } + +publishing { + publications { + maven(MavenPublication) { + groupId = 'ru.dragonestia.msb3' + artifactId = 'resource-compiler' + version = project.ext.get("VERSION") + + from components.java + } + } + + repositories { + maven { + name = "Gitea" + url = uri(MSB3_MAVEN_REPOSITORY) + allowInsecureProtocol = true + + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "token ${dragonestiaGiteaToken}" + } + + authentication { + header(HttpHeaderAuthentication) + } + } + } +}