From e2a033c24ff0c370e0c325703040f7bf5f8b586f Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 2 Feb 2022 12:13:36 +0000 Subject: [PATCH] Dev changes --- .github/workflows/test-publish.yml | 42 ++++++++++++++++++++++++++++++ build.gradle.kts | 2 ++ eco-api/api-java/build.gradle | 6 +---- eco-api/build.gradle | 13 ++++----- settings.gradle.kts | 2 ++ 5 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/test-publish.yml diff --git a/.github/workflows/test-publish.yml b/.github/workflows/test-publish.yml new file mode 100644 index 00000000..69a9e815 --- /dev/null +++ b/.github/workflows/test-publish.yml @@ -0,0 +1,42 @@ +name: Publish release + +on: [push] + +jobs: + publish-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout latest code + uses: actions/checkout@v2 + + - name: Set outputs + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: 17 + + - name: Setup build cache + uses: actions/cache@v2.1.6 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} + restore-keys: | + ${{ runner.os }}-gradle- + + + - name: Publish artifact + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # The GITHUB_REF tag comes in the format 'refs/tags/xxx'. + # So if we split on '/' and take the 3rd value, we can get the release name. + run: | + NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3) + echo "New version: ${{ steps.vars.outputs.sha_short }}" + echo "Github username: ${GITHUB_ACTOR}" + ./gradlew -Pversion=${{ steps.vars.outputs.sha_short }} publish \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 00612c98..fabd4e7e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,9 +10,11 @@ dependencies { implementation(project(":eco-core:core-plugin")) implementation(project(":eco-core:core-proxy")) implementation(project(":eco-core:core-backend")) + /* implementation(project(":eco-core:core-nms:v1_16_R3")) implementation(project(path = ":eco-core:core-nms:v1_17_R1", configuration = "reobf")) implementation(project(path = ":eco-core:core-nms:v1_18_R1", configuration = "reobf")) + */ } allprojects { diff --git a/eco-api/api-java/build.gradle b/eco-api/api-java/build.gradle index 206c7084..50f9ee41 100644 --- a/eco-api/api-java/build.gradle +++ b/eco-api/api-java/build.gradle @@ -1,6 +1,2 @@ group 'com.willfp' -version rootProject.version - -java { - withJavadocJar() -} \ No newline at end of file +version rootProject.version \ No newline at end of file diff --git a/eco-api/build.gradle b/eco-api/build.gradle index 71a66f2c..46062076 100644 --- a/eco-api/build.gradle +++ b/eco-api/build.gradle @@ -1,7 +1,3 @@ -dependencies { - api project(":eco-api").getSubprojects() -} - subprojects { group 'com.willfp' version rootProject.version @@ -17,10 +13,15 @@ subprojects { compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.1-SNAPSHOT' compileOnly 'com.google.code.gson:gson:2.8.8' } + + java { + withJavadocJar() + } } -java { - withJavadocJar() +dependencies { + api project(":eco-api:api-java") + api project(":eco-api:api-kotlin") } build.dependsOn publishToMavenLocal diff --git a/settings.gradle.kts b/settings.gradle.kts index 77a54ca1..9f63d347 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -12,10 +12,12 @@ include(":eco-api") include(":eco-api:api-java") include(":eco-api:api-kotlin") include(":eco-core") +/* include(":eco-core:core-nms") include(":eco-core:core-nms:v1_16_R3") include(":eco-core:core-nms:v1_17_R1") include(":eco-core:core-nms:v1_18_R1") + */ include(":eco-core:core-proxy") include(":eco-core:core-plugin") include(":eco-core:core-backend") \ No newline at end of file