Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Try to include generated classes in build
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Apr 23, 2022
1 parent 70ad4df commit 6f24d14
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Offz
7 changes: 6 additions & 1 deletion .github/workflows/gradle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
paths-ignore:
- '**.md'
- 'CODEOWNERS'

jobs:
build:
Expand All @@ -23,8 +24,12 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# We build twice to include generated files lol
- name: Build
run: gradle build --stacktrace
run: gradle build

- name: Build another time :)
run: gradle build

- name: Upload build
uses: actions/upload-artifact@v1
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
paths-ignore:
- '**.md'
- 'CODEOWNERS'

jobs:
build:
Expand All @@ -26,8 +27,12 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# We build twice to include generated files lol
- name: Run gradle build and publish
run: gradle build publish -PmineinabyssMavenUsername=${{ secrets.MAVEN_PUBLISH_USERNAME }} -PmineinabyssMavenPassword=${{ secrets.MAVEN_PUBLISH_PASSWORD }}
run: gradle build

- name: Run gradle build and publish
run: gradle publish -PmineinabyssMavenUsername=${{ secrets.MAVEN_PUBLISH_USERNAME }} -PmineinabyssMavenPassword=${{ secrets.MAVEN_PUBLISH_PASSWORD }}

- name: Get version from gradle
shell: bash
Expand All @@ -43,6 +48,5 @@ jobs:
prerelease: false
automatic_release_tag: v${{ steps.extract_version.outputs.version }}
files: |
protocolburrito-plugin/build/libs/protocolburrito-plugin*.jar
!*-dev*
protocolburrito-plugin/build/libs/protocolburrito-plugin*[0-9].jar
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
val serverVersion: String by project

plugins {
kotlin("jvm")
id("com.mineinabyss.conventions.kotlin")
Expand All @@ -14,6 +16,8 @@ repositories {
allprojects {
apply(plugin = "java")

version = rootProject.version

repositories {
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.dmulloy2.net/nexus/repository/public/")//ProtocolLib
Expand All @@ -30,19 +34,18 @@ allprojects {
}

dependencies {
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
compileOnly("org.spigotmc:spigot-api:$serverVersion")
api(project(":protocolburrito-api"))
compileOnly(project(":protocolburrito-generator"))
}


sourceSets["main"].java.srcDir(file("$rootDir/protocolburrito-generator/build/generated/burrito/main"))

tasks {
assemble {
dependsOn(reobfJar)
dependsOn(project(":protocolburrito-plugin").tasks.build)
}

shadowJar {
archiveClassifier.set("")
}
Expand Down
7 changes: 4 additions & 3 deletions protocolburrito-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ plugins {
}

dependencies {
// MineInAbyss platform
// spigot(libs.kotlin.stdlib)

implementation(project(":"))
implementation("com.mineinabyss:idofront:$idofrontVersion")
}
Expand All @@ -22,4 +19,8 @@ tasks {
include(dependency("com.mineinabyss:idofront.*:.*"))
}
}

assemble {
dependsOn(project(":protocolburrito-generator").tasks.assemble)
}
}

0 comments on commit 6f24d14

Please sign in to comment.