Advertisement
Guest User

"A-API"

a guest
Sep 13th, 2024
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.17 KB | Source Code | 0 0
  1. plugins {
  2.     id 'java-library'
  3.     id 'maven-publish'
  4. }
  5.  
  6. dependencies {
  7.     compileOnly "io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT"
  8.     api "dev.triumphteam:triumph-gui:3.1.10"
  9. }
  10.  
  11. def targetJavaVersion = 21
  12. java {
  13.     withSourcesJar()
  14.     def javaVersion = JavaVersion.toVersion(targetJavaVersion)
  15.     sourceCompatibility = javaVersion
  16.     targetCompatibility = javaVersion
  17.     if (JavaVersion.current() < javaVersion) {
  18.         toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
  19.     }
  20. }
  21.  
  22. tasks.withType(JavaCompile).configureEach {
  23.     if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
  24.         options.release = targetJavaVersion
  25.     }
  26. }
  27.  
  28. publishing {
  29.     repositories {
  30.         maven {
  31.             url myMavenRepoWriteUrl
  32.  
  33.             credentials {
  34.                 username myMavenRepoWriteUsername
  35.                 password myMavenRepoWritePassword
  36.             }
  37.         }
  38.     }
  39. }
  40.  
  41. publishing {
  42.     publications {
  43.         maven(MavenPublication) {
  44.             groupId = group
  45.             artifactId = 'EdenorRP-api'
  46.             version = version
  47.  
  48.             from components.java
  49.         }
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement