From de265b93ac4109f246774918d669600b97c26d35 Mon Sep 17 00:00:00 2001 From: Legends11 <235496468+tickwarden@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:30:03 +0300 Subject: [PATCH 1/2] Update build.gradle --- build.gradle | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/build.gradle b/build.gradle index 872b13f..b5fb2dd 100644 --- a/build.gradle +++ b/build.gradle @@ -297,3 +297,34 @@ tasks.register("clean", Delete) { description = "Deletes the build/ directory" delete(layout.buildDirectory) } + + +// --------------------------------------------------------------------- +// createSourceArchive: Copies project files into the archive directory, excluding .git +// --------------------------------------------------------------------- +tasks.register('createSourceArchive', Copy) { + description = 'Copies project files into the archive directory, excluding .git' + from(rootDir) { + exclude 'archive/**' + exclude '.github/**' + exclude '.git/**' + } + into layout.buildDirectory.dir('archive/source') +} + +tasks.register('copyGitHistory', Copy) { + description = 'Copies git history into the archive directory' + dependsOn createSourceArchive + from(rootDir) { + include '.git/**' + } + into layout.buildDirectory.dir('archive/source') +} + +tasks.register('createSourceZip', Zip) { + description = 'Creates source-with-history.zip' + dependsOn copyGitHistory + from layout.buildDirectory.dir('archive/source') + archiveFileName = 'source-with-history.zip' + destinationDirectory = layout.buildDirectory.dir('archive') +} From a76b50d367869acb881d6217f25dc679076dadab Mon Sep 17 00:00:00 2001 From: Legends11 <235496468+tickwarden@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:35:54 +0300 Subject: [PATCH 2/2] Add archive job to CI workflow for source zip creation --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 041bd75..d293320 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,3 +102,16 @@ jobs: git diff --cached --quiet && exit 0 git commit -m "Auto generate build.py" git push origin HEAD:${GITHUB_REF#refs/heads/} + + archive: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: "21" + - name: Gradle createSourceZip + run: chmod +x gradlew && ./gradlew createSourceZip --no-daemon