File tree Expand file tree Collapse file tree 4 files changed +70
-4
lines changed
src/main/kotlin/org/allaymc/gradle/plugin Expand file tree Collapse file tree 4 files changed +70
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ paths :
7+ - .github/workflows/gradle.yml
8+ - gradle.properties
9+ - build.gradle.kts
10+ - settings.gradle.kts
11+ - plugin/src/**
12+ - sample/src/**
13+ pull_request :
14+ paths :
15+ - .github/workflows/gradle.yml
16+ - gradle.properties
17+ - build.gradle.kts
18+ - settings.gradle.kts
19+ - plugin/src/**
20+ - sample/src/**
21+
22+ jobs :
23+ publish :
24+ runs-on : ubuntu-latest
25+ timeout-minutes : 10
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v5
29+
30+ - name : Setup Java
31+ uses : actions/setup-java@v5
32+ with :
33+ java-version : ' 21'
34+ distribution : ' zulu'
35+
36+
37+ - name : Setup Gradle
38+ uses : gradle/actions/setup-gradle@v5
39+ with :
40+ gradle-version : wrapper
41+ cache-overwrite-existing : true
42+ cache-read-only : false
43+ build-scan-publish : true
44+ build-scan-terms-of-use-url : " https://gradle.com/terms-of-service"
45+ build-scan-terms-of-use-agree : " yes"
46+
47+ - name : Build
48+ run : |
49+ chmod +x gradlew
50+ ./gradlew build
51+
52+ - name : Publish to Gradle Plugin Portal
53+ if : success() && github.event_name == 'push' && github.repository == 'AllayMC/AllayGradle' && contains(github.ref_name, 'main')
54+ run : ./gradlew :plugin:publishPlugins
55+ env :
56+ GRADLE_PUBLISH_KEY : ${{ secrets.GRADLE_PUBLISH_KEY }}
57+ GRADLE_PUBLISH_SECRET : ${{ secrets.GRADLE_PUBLISH_SECRET }}
Original file line number Diff line number Diff line change 11[versions ]
2- allay-gradle = " 0.1.0-SNAPSHOT "
3-
2+ allay-gradle = " 0.1.0"
3+ publish = " 1.3.1 "
44kotlin = " 1.9.23"
55kotlinx-serialization = " 1.5.0"
66
@@ -9,5 +9,6 @@ kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serializa
99
1010[plugins ]
1111allay-gradle = { id = " org.allaymc.gradle.plugin" , version.ref = " allay-gradle" }
12+ publish = { id = " com.gradle.plugin-publish" , version.ref = " publish" }
1213kotlin-jvm = { id = " org.jetbrains.kotlin.jvm" , version.ref = " kotlin" }
1314kotlinx-serialization = { id = " org.jetbrains.kotlin.plugin.serialization" , version.ref = " kotlin" }
Original file line number Diff line number Diff line change 11plugins {
2- `java- gradle- plugin`
32 `kotlin- dsl`
3+ alias(libs.plugins.publish)
44 alias(libs.plugins.kotlin.jvm)
55 alias(libs.plugins.kotlinx.serialization)
66}
77
8+ group = " org.allaymc"
9+ version = libs.versions.allay.gradle.get()
10+
811repositories {
912 mavenCentral()
1013 gradlePluginPortal()
@@ -16,10 +19,14 @@ dependencies {
1619}
1720
1821gradlePlugin {
22+ website = " https://github.com/AllayMC/AllayGradle"
23+ vcsUrl = " https://github.com/AllayMC/AllayGradle.git"
1924 plugins {
2025 create(" allayGradlePlugin" ) {
2126 id = libs.plugins.allay.gradle.get().pluginId
22- version = libs.versions.allay.gradle.get()
27+ displayName = " Gradle plugin for AllayMC"
28+ description = " A Gradle plugin designed to boost Allay plugin development!"
29+ tags = listOf (" minecraft" , " allaymc" , " minecraft-plugin" )
2330 implementationClass = " org.allaymc.gradle.plugin.AllayPlugin"
2431 }
2532 }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ class AllayPlugin : Plugin<Project> {
1313
1414 project.repositories {
1515 mavenCentral()
16+ maven(" https://central.sonatype.com/repository/maven-snapshots/" )
1617 maven(" https://www.jetbrains.com/intellij-repository/releases/" )
1718 maven(" https://repo.opencollab.dev/maven-releases/" )
1819 maven(" https://repo.opencollab.dev/maven-snapshots/" )
You can’t perform that action at this time.
0 commit comments