forked from public-mirrors/ConfigLib
Migrate build scripts to Kotlin DSL.
parent
b047ddcb6e
commit
84f38cdc71
@ -0,0 +1,32 @@
|
||||
name: publish-on-master-push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ] # TODO: change to master
|
||||
paths-ignore:
|
||||
- '**/README.md'
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 16
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '16'
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Archive test reports
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-reports
|
||||
path: |
|
||||
build/reports/**/*
|
||||
- name: Publish to GitHub Packages
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
GITHUB_ACTOR: ${{ github.actor }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -1,48 +0,0 @@
|
||||
allprojects {
|
||||
group 'de.exlll'
|
||||
version '2.2.0'
|
||||
}
|
||||
subprojects {
|
||||
apply plugin: 'java'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
repositories { mavenCentral() }
|
||||
|
||||
dependencies {
|
||||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.0.3'
|
||||
testImplementation group: 'org.junit.platform', name: 'junit-platform-runner', version: '1.0.3'
|
||||
testImplementation group: 'org.junit.platform', name: 'junit-platform-suite-api', version: '1.0.3'
|
||||
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
|
||||
testImplementation group: 'com.google.jimfs', name: 'jimfs', version: '1.1'
|
||||
}
|
||||
}
|
||||
buildscript {
|
||||
if (project.hasProperty("local_script")) {
|
||||
apply from: file(local_script + "/buildscript.gradle"), to: buildscript
|
||||
}
|
||||
}
|
||||
if (project.hasProperty("local_script")) {
|
||||
apply from: file(local_script + "/build.gradle")
|
||||
}
|
||||
|
||||
project(':configlib-core') {
|
||||
dependencies { implementation group: 'org.yaml', name: 'snakeyaml', version: '1.20' }
|
||||
}
|
||||
project(':configlib-bukkit') {
|
||||
repositories { maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } }
|
||||
dependencies {
|
||||
implementation project(':configlib-core')
|
||||
implementation group: 'org.bukkit', name: 'bukkit', version: '1.12.2-R0.1-SNAPSHOT'
|
||||
}
|
||||
jar { from { project(':configlib-core').sourceSets.main.output } }
|
||||
}
|
||||
project(':configlib-bungee') {
|
||||
repositories { maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } }
|
||||
dependencies {
|
||||
implementation project(':configlib-core')
|
||||
implementation group: 'net.md-5', name: 'bungeecord-api', version: '1.12-SNAPSHOT'
|
||||
}
|
||||
jar { from { project(':configlib-core').sourceSets.main.output } }
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
plugins {
|
||||
java
|
||||
idea
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = "de.exlll"
|
||||
version = "2.2.0"
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "java")
|
||||
apply(plugin = "idea")
|
||||
apply(plugin = "maven-publish")
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
java.targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.0.3")
|
||||
testImplementation("org.junit.platform:junit-platform-runner:1.0.3")
|
||||
testImplementation("org.junit.platform:junit-platform-suite-api:1.0.3")
|
||||
testImplementation("org.hamcrest:hamcrest-all:1.3")
|
||||
testImplementation("com.google.jimfs:jimfs:1.1")
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "GitHubPackages"
|
||||
url = uri("https://maven.pkg.github.com/Exlll/ConfigLib")
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_ACTOR")
|
||||
password = System.getenv("GITHUB_TOKEN")
|
||||
}
|
||||
}
|
||||
publications {
|
||||
register<MavenPublication>("gpr") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project(":configlib-core") {
|
||||
dependencies {
|
||||
implementation("org.yaml:snakeyaml:1.20")
|
||||
}
|
||||
}
|
||||
project(":configlib-bukkit") {
|
||||
repositories {
|
||||
maven(url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||
}
|
||||
dependencies {
|
||||
implementation(project(":configlib-core"))
|
||||
implementation("org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
tasks.jar { from(project(":configlib-core").sourceSets["main"].output) }
|
||||
}
|
||||
project(":configlib-bungee") {
|
||||
repositories {
|
||||
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
|
||||
}
|
||||
dependencies {
|
||||
implementation(project(":configlib-core"))
|
||||
implementation("net.md-5:bungeecord-api:1.12-SNAPSHOT")
|
||||
}
|
||||
|
||||
tasks.jar { from(project(":configlib-core").sourceSets["main"].output) }
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
rootProject.name = 'configlib'
|
||||
include 'ConfigLib-Core'
|
||||
findProject(':ConfigLib-Core')?.name = 'configlib-core'
|
||||
include 'ConfigLib-Bukkit'
|
||||
findProject(':ConfigLib-Bukkit')?.name = 'configlib-bukkit'
|
||||
include 'ConfigLib-Bungee'
|
||||
findProject(':ConfigLib-Bungee')?.name = 'configlib-bungee'
|
||||
|
@ -0,0 +1,8 @@
|
||||
rootProject.name = "configlib"
|
||||
include("ConfigLib-Core")
|
||||
findProject(":ConfigLib-Core")?.name = "configlib-core"
|
||||
include("ConfigLib-Bukkit")
|
||||
findProject(":ConfigLib-Bukkit")?.name = "configlib-bukkit"
|
||||
include("ConfigLib-Bungee")
|
||||
findProject(":ConfigLib-Bungee")?.name = "configlib-bungee"
|
||||
|
Loading…
Reference in New Issue