mirror of
https://github.com/GayPizzaSpecifications/concrete.git
synced 2025-08-05 22:21:33 +00:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
b040711701
|
|||
96ed2ff2bb
|
|||
061a788d93
|
|||
3c02e23163
|
|||
1c4217da53
|
|||
81985013e8
|
|||
55efba22bd
|
|||
2cb2d8fe89
|
|||
b3219afb24
|
|||
ac7ec227b0
|
|||
0ed243e9ae
|
|||
34648bdc8c
|
|||
e1e42df67e
|
|||
dc1ebe09b7
|
|||
1cd36b5529
|
20
.github/workflows/portal.yml
vendored
Normal file
20
.github/workflows/portal.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Gradle Plugin Portal
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Set up JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
- name: Publish with Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: "publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PLUGIN_PUBLISHING_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PLUGIN_PUBLISHING_SECRET }}"
|
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
|
16
.github/workflows/qodona.yml
vendored
Normal file
16
.github/workflows/qodona.yml
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
name: Qodona
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
scan:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Qodana Scan
|
||||||
|
uses: JetBrains/qodana-action@main
|
||||||
|
env:
|
||||||
|
QODANA_TOKEN: "${{ secrets.QODANA_TOKEN }}"
|
||||||
|
- name: Upload CodeQL SARIF
|
||||||
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
|
with:
|
||||||
|
sarif_file: "${{ runner.temp }}/qodana/results/qodana.sarif.json"
|
@ -1,13 +1,15 @@
|
|||||||
|
@file:Suppress("UnstableApiUsage")
|
||||||
plugins {
|
plugins {
|
||||||
`kotlin-dsl`
|
`kotlin-dsl`
|
||||||
kotlin("plugin.serialization") version "1.7.10"
|
|
||||||
|
|
||||||
id("maven-publish")
|
`maven-publish`
|
||||||
id("java-gradle-plugin")
|
`java-gradle-plugin`
|
||||||
|
|
||||||
|
id("com.gradle.plugin-publish") version "1.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "gay.pizza.foundation"
|
group = "gay.pizza.foundation"
|
||||||
version = "0.8.0"
|
version = "0.11.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -15,8 +17,8 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-serialization:1.7.10")
|
implementation("org.jetbrains.kotlin:kotlin-serialization:1.8.10")
|
||||||
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")
|
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation("com.google.code.gson:gson:2.10.1")
|
||||||
|
|
||||||
@ -25,29 +27,56 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
website.set("https://github.com/GayPizzaSpecifications/concrete")
|
||||||
|
vcsUrl.set("https://github.com/GayPizzaSpecifications/concrete")
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
create("concrete-root") {
|
create("concrete-root") {
|
||||||
id = "gay.pizza.foundation.concrete-root"
|
id = "gay.pizza.foundation.concrete-root"
|
||||||
implementationClass = "gay.pizza.foundation.concrete.ConcreteRootPlugin"
|
implementationClass = "gay.pizza.foundation.concrete.ConcreteRootPlugin"
|
||||||
|
|
||||||
|
displayName = "Concrete Root"
|
||||||
|
description = "Concrete project root."
|
||||||
}
|
}
|
||||||
|
|
||||||
create("concrete-base") {
|
create("concrete-base") {
|
||||||
id = "gay.pizza.foundation.concrete-base"
|
id = "gay.pizza.foundation.concrete-base"
|
||||||
implementationClass = "gay.pizza.foundation.concrete.ConcreteBasePlugin"
|
implementationClass = "gay.pizza.foundation.concrete.ConcreteBasePlugin"
|
||||||
|
|
||||||
|
displayName = "Concrete Base"
|
||||||
|
description = "Concrete project base."
|
||||||
}
|
}
|
||||||
|
|
||||||
create("concrete-library") {
|
create("concrete-library") {
|
||||||
id = "gay.pizza.foundation.concrete-library"
|
id = "gay.pizza.foundation.concrete-library"
|
||||||
implementationClass = "gay.pizza.foundation.concrete.ConcreteLibraryPlugin"
|
implementationClass = "gay.pizza.foundation.concrete.ConcreteLibraryPlugin"
|
||||||
|
|
||||||
|
displayName = "Concrete Library"
|
||||||
|
description = "Concrete project library."
|
||||||
}
|
}
|
||||||
|
|
||||||
create("concrete-plugin") {
|
create("concrete-plugin") {
|
||||||
id = "gay.pizza.foundation.concrete-plugin"
|
id = "gay.pizza.foundation.concrete-plugin"
|
||||||
implementationClass = "gay.pizza.foundation.concrete.ConcretePluginPlugin"
|
implementationClass = "gay.pizza.foundation.concrete.ConcretePluginPlugin"
|
||||||
|
|
||||||
|
displayName = "Concrete Library"
|
||||||
|
description = "Concrete project plugin."
|
||||||
|
}
|
||||||
|
|
||||||
|
forEach { declaration ->
|
||||||
|
declaration.tags.set(listOf("foundation-concrete", "minecraft-bukkit"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val gradlePublishingKey: String? = System.getenv("GRADLE_PLUGIN_PUBLISHING_KEY")
|
||||||
|
val gradlePublishingSecret: String? = System.getenv("GRADLE_PLUGIN_PUBLISHING_SECRET")
|
||||||
|
|
||||||
|
if (gradlePublishingKey != null && gradlePublishingSecret != null) {
|
||||||
|
project.setProperty("gradle.publish.key", gradlePublishingKey.toString())
|
||||||
|
project.setProperty("gradle.publish.secret", gradlePublishingSecret.toString())
|
||||||
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
val version = JavaVersion.toVersion("17")
|
val version = JavaVersion.toVersion("17")
|
||||||
sourceCompatibility = version
|
sourceCompatibility = version
|
||||||
@ -101,3 +130,7 @@ publishing {
|
|||||||
tasks.withType<Wrapper> {
|
tasks.withType<Wrapper> {
|
||||||
gradleVersion = "7.6"
|
gradleVersion = "7.6"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
withSourcesJar()
|
||||||
|
}
|
||||||
|
@ -11,12 +11,16 @@ class ConcretePluginPlugin : ConcreteBaseBukkitPlugin() {
|
|||||||
|
|
||||||
project.plugins.apply("com.github.johnrengelman.shadow")
|
project.plugins.apply("com.github.johnrengelman.shadow")
|
||||||
|
|
||||||
project.tasks.find<ProcessResources>("processResources")!!.apply {
|
// During IDEA project import, if this code is active, it will print warnings.
|
||||||
val props = mapOf("version" to project.version.toString())
|
// This will make the VERSION field unexpanded if you run using the IntelliJ build system.
|
||||||
inputs.properties(props)
|
if (!project.properties.containsKey("idea.gradle.do.not.build.tasks")) {
|
||||||
filteringCharset = "UTF-8"
|
project.tasks.find<ProcessResources>("processResources")!!.apply {
|
||||||
filesMatching("plugin.yml") {
|
val props = mapOf("version" to project.version.toString())
|
||||||
expand(props)
|
inputs.properties(props)
|
||||||
|
filteringCharset = "UTF-8"
|
||||||
|
filesMatching("plugin.yml") {
|
||||||
|
expand(props)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
tools/ensure-new-lines.sh
Executable file
10
tools/ensure-new-lines.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
git ls-files -z | while IFS= read -rd '' f
|
||||||
|
do
|
||||||
|
if file --mime-encoding "$f" | grep -qv binary
|
||||||
|
then
|
||||||
|
tail -c1 < "$f" | read -r _ || echo >> "$f"
|
||||||
|
fi
|
||||||
|
done
|
Reference in New Issue
Block a user