|
1 | | -/* |
2 | | - * This file was generated by the Gradle 'init' task. |
3 | | - */ |
4 | | - |
5 | 1 | plugins { |
6 | 2 | `java-library` |
7 | 3 | `maven-publish` |
| 4 | + id("io.github.0ffz.github-packages") version "1.2.1" |
8 | 5 | } |
9 | 6 |
|
10 | 7 | repositories { |
11 | 8 | mavenLocal() |
12 | | - maven { |
13 | | - url = uri("https://maven.pkg.github.com/APDevTeam/Movecraft") |
14 | | - } |
15 | | - |
16 | | - maven { |
17 | | - url = uri("https://repo.maven.apache.org/maven2/") |
18 | | - } |
19 | | - |
20 | | - maven { |
21 | | - url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") |
22 | | - } |
23 | | - |
24 | | - maven { |
25 | | - url = uri("https://maven.enginehub.org/repo/") |
26 | | - } |
27 | | - |
28 | | - maven { |
29 | | - url = uri("https://repo.citizensnpcs.co/") |
30 | | - } |
31 | | - |
32 | | - maven { |
33 | | - url = uri("https://oss.sonatype.org/content/groups/public/") |
34 | | - } |
35 | | - |
36 | | - maven { |
37 | | - url = uri("https://jitpack.io") |
38 | | - } |
| 9 | + mavenCentral() |
| 10 | + maven("https://repo.papermc.io/repository/maven-public/") |
| 11 | + maven { githubPackage("apdevteam/movecraft")(this) } |
| 12 | + maven("https://maven.enginehub.org/repo/") |
| 13 | + maven("https://repo.citizensnpcs.co/") |
| 14 | + maven("https://jitpack.io") |
39 | 15 | } |
40 | 16 |
|
41 | 17 | dependencies { |
42 | | - api(libs.net.citizensnpcs.citizens.main) |
43 | | - compileOnly(libs.org.spigotmc.spigot.api) |
44 | | - compileOnly(libs.com.sk89q.worldguard.worldguard.bukkit) |
45 | | - compileOnly(libs.com.github.milkbowl.vaultapi) |
46 | | - system(libs.com.degitise.minevid.dtltraders) |
| 18 | + api("org.jetbrains:annotations-java5:24.1.0") |
| 19 | + compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT") |
| 20 | + compileOnly("net.countercraft:movecraft:+") |
| 21 | + compileOnly("net.citizensnpcs:citizensapi:+") |
| 22 | + compileOnly(files("libs/dtlTraders.jar")) |
| 23 | + compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") |
| 24 | + api("com.sk89q.worldguard:worldguard-bukkit:7.0.10") |
47 | 25 | } |
48 | 26 |
|
49 | 27 | group = "net.apdevteam.apautonpc" |
50 | | -version = "4.0.0_beta-2" |
| 28 | +version = "4.0.0_beta-2_gradle" |
51 | 29 | description = "APAutoNPC" |
52 | | -java.sourceCompatibility = JavaVersion.VERSION_13 |
| 30 | +java.toolchain.languageVersion = JavaLanguageVersion.of(21) |
53 | 31 |
|
54 | | -publishing { |
55 | | - publications.create<MavenPublication>("maven") { |
56 | | - from(components["java"]) |
57 | | - } |
| 32 | +tasks.jar { |
| 33 | + archiveBaseName.set("APAutoNPC") |
| 34 | + archiveClassifier.set("") |
| 35 | + archiveVersion.set("") |
58 | 36 | } |
59 | 37 |
|
60 | | -tasks.withType<JavaCompile>() { |
61 | | - options.encoding = "UTF-8" |
| 38 | +tasks.processResources { |
| 39 | + from(rootProject.file("LICENSE.md")) |
| 40 | + filesMatching("*.yml") { |
| 41 | + expand(mapOf("projectVersion" to project.version)) |
| 42 | + } |
62 | 43 | } |
63 | 44 |
|
64 | | -tasks.withType<Javadoc>() { |
65 | | - options.encoding = "UTF-8" |
| 45 | +publishing { |
| 46 | + publications { |
| 47 | + create<MavenPublication>("maven") { |
| 48 | + groupId = "net.apdevteam.apautonpc" |
| 49 | + artifactId = "apautonpc" |
| 50 | + version = "${project.version}" |
| 51 | + |
| 52 | + artifact(tasks.jar) |
| 53 | + } |
| 54 | + } |
| 55 | + repositories { |
| 56 | + maven { |
| 57 | + name = "GitHubPackages" |
| 58 | + url = uri("https://maven.pkg.github.com/apdevteam/apautonpc") |
| 59 | + credentials { |
| 60 | + username = System.getenv("GITHUB_ACTOR") |
| 61 | + password = System.getenv("GITHUB_TOKEN") |
| 62 | + } |
| 63 | + } |
| 64 | + } |
66 | 65 | } |
0 commit comments