mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
Update to civgradle2
This commit is contained in:
24
plugins/itemexchange-paper/.github/workflows/build.yml
vendored
Normal file
24
plugins/itemexchange-paper/.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: temurin
|
||||
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: build
|
||||
25
plugins/itemexchange-paper/.github/workflows/publish.yml
vendored
Normal file
25
plugins/itemexchange-paper/.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: temurin
|
||||
|
||||
- uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CIVMC_NEXUS_USER: ${{ secrets.CIVMC_NEXUS_USER }}
|
||||
CIVMC_NEXUS_PASSWORD: ${{ secrets.CIVMC_NEXUS_PASSWORD }}
|
||||
@@ -1,7 +0,0 @@
|
||||
name: Build
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
call_build:
|
||||
uses: CivMC/.github/.github/workflows/gradle_build.yml@master
|
||||
@@ -1,8 +0,0 @@
|
||||
name: Publish
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
call_publish:
|
||||
uses: CivMC/.github/.github/workflows/gradle_publish.yml@master
|
||||
@@ -1,54 +1,21 @@
|
||||
import net.civmc.civgradle.common.util.civRepo
|
||||
import net.civmc.civgradle.CivGradleExtension
|
||||
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
id("net.civmc.civgradle.plugin") version "1.0.0-SNAPSHOT"
|
||||
}
|
||||
|
||||
// Temporary hack:
|
||||
// Remove the root build directory
|
||||
gradle.buildFinished {
|
||||
project.buildDir.deleteRecursively()
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = "net.civmc.itemexchange"
|
||||
version = "2.0.1"
|
||||
description = "ItemExchange"
|
||||
id("net.civmc.civgradle") version "2.+" apply false
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "net.civmc.civgradle.plugin")
|
||||
apply(plugin = "net.civmc.civgradle")
|
||||
apply(plugin = "java-library")
|
||||
apply(plugin = "maven-publish")
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
configure<CivGradleExtension> {
|
||||
pluginName = project.property("pluginName") as String
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
civRepo("CivMC/CivModCore")
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/CivMC/ItemExchange")
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_ACTOR")
|
||||
password = System.getenv("GITHUB_TOKEN")
|
||||
}
|
||||
}
|
||||
}
|
||||
publications {
|
||||
register<MavenPublication>("gpr") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
maven("https://repo.civmc.net/repository/maven-public")
|
||||
maven("https://jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,14 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
id("net.civmc.civgradle.plugin")
|
||||
id("io.papermc.paperweight.userdev") version "1.3.1"
|
||||
}
|
||||
|
||||
civGradle {
|
||||
paper {
|
||||
pluginName = "ItemExchange"
|
||||
}
|
||||
id("io.papermc.paperweight.userdev")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
paperDevBundle("1.18.2-R0.1-SNAPSHOT")
|
||||
|
||||
compileOnly("net.civmc.civmodcore:paper:2.0.0-SNAPSHOT:dev-all")
|
||||
compileOnly("net.civmc:namelayer-spigot:3.0.0-SNAPSHOT:dev")
|
||||
compileOnly("net.civmc:citadel:5.0.0-SNAPSHOT:dev")
|
||||
compileOnly("net.cimc.jukealert:paper:3.0.0-SNAPSHOT:dev")
|
||||
compileOnly("net.civmc.civmodcore:civmodcore-paper:2.3.5:dev-all")
|
||||
compileOnly("net.civmc.namelayer:namelayer-paper:3.0.4:dev")
|
||||
compileOnly("net.civmc.citadel:citadel-paper:5.1.2:dev")
|
||||
compileOnly("net.civmc.jukealert:jukealert-paper:3.0.7:dev")
|
||||
|
||||
compileOnly("org.projectlombok:lombok:1.18.24")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.24")
|
||||
|
||||
@@ -39,7 +39,7 @@ public final class ShopPurchaseAction extends LoggablePlayerAction {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getChatRepresentationIdentifier() {
|
||||
public String getChatRepresentationIdentifier() {
|
||||
return "ItemExchange purchase";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
rootProject.name = "itemexchange"
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
maven("https://repo.civmc.net/repository/maven-public/")
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
maven {
|
||||
url = uri("https://maven.pkg.github.com/CivMC/CivGradle")
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_ACTOR")
|
||||
password = System.getenv("GITHUB_TOKEN")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "itemexchange"
|
||||
|
||||
include(":paper")
|
||||
project(":paper").name = rootProject.name + "-paper"
|
||||
|
||||
Reference in New Issue
Block a user