mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-10-18 21:34:03 +02:00
Build AUR source packages against their own Gradle home, not offline
Both source PKGBUILDs ran "./gradlew --offline" against the builder's personal ~/.gradle. That only worked as long as the local cache happened to hold every dependency; the SpotBugs plugin 6.5.12 added in #114 broke "yay -S kst4contest-git" with "could not resolve plugin artifact". - drop --offline and point GRADLE_USER_HOME into $srcdir, so the package builds the same on any machine - run with --no-daemon so no Gradle process outlives makepkg - drop gradle from makedepends: the wrapper fetches its own distribution Verified with makepkg -f on an empty Gradle home for kst4contest-git. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7b44eb0c2e
commit
dd9f87a767
2 files changed
+14
-4
No files matched your search
@@ -7,7 +7,7 @@ arch=('x86_64')
|
|||||||
url="https://github.com/praktimarc/kst4contest"
|
url="https://github.com/praktimarc/kst4contest"
|
||||||
license=('GPL-3.0-only')
|
license=('GPL-3.0-only')
|
||||||
depends=('gst-plugins-base' 'gst-plugins-good')
|
depends=('gst-plugins-base' 'gst-plugins-good')
|
||||||
makedepends=('java-environment=21' 'gradle' 'git')
|
makedepends=('java-environment=21' 'git')
|
||||||
provides=('kst4contest')
|
provides=('kst4contest')
|
||||||
conflicts=('kst4contest' 'kst4contest-bin')
|
conflicts=('kst4contest' 'kst4contest-bin')
|
||||||
source=("kst4contest::git+https://github.com/praktimarc/kst4contest.git")
|
source=("kst4contest::git+https://github.com/praktimarc/kst4contest.git")
|
||||||
@@ -26,7 +26,12 @@ build() {
|
|||||||
export JAVA_HOME=$(find /usr/lib/jvm -maxdepth 1 -name 'java-21-*' -type d | head -n 1)
|
export JAVA_HOME=$(find /usr/lib/jvm -maxdepth 1 -name 'java-21-*' -type d | head -n 1)
|
||||||
export PATH="${JAVA_HOME}/bin:${PATH}"
|
export PATH="${JAVA_HOME}/bin:${PATH}"
|
||||||
|
|
||||||
./gradlew --offline -S :app-desktop:createDistributable
|
# A Gradle home inside $srcdir keeps the build independent of whatever the
|
||||||
|
# builder's ~/.gradle happens to hold: with --offline against the personal
|
||||||
|
# cache, every dependency added since the last local build broke the package.
|
||||||
|
export GRADLE_USER_HOME="${srcdir}/gradle-home"
|
||||||
|
|
||||||
|
./gradlew --no-daemon -S :app-desktop:createDistributable
|
||||||
|
|
||||||
# package() reads dist/KST4Contest. Application name, icon and the JDK
|
# package() reads dist/KST4Contest. Application name, icon and the JDK
|
||||||
# module list come from app-desktop/build.gradle.kts.
|
# module list come from app-desktop/build.gradle.kts.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ arch=('x86_64')
|
|||||||
url="https://github.com/praktimarc/kst4contest"
|
url="https://github.com/praktimarc/kst4contest"
|
||||||
license=('GPL-3.0-only')
|
license=('GPL-3.0-only')
|
||||||
depends=('gst-plugins-base' 'gst-plugins-good')
|
depends=('gst-plugins-base' 'gst-plugins-good')
|
||||||
makedepends=('java-environment=21' 'gradle')
|
makedepends=('java-environment=21')
|
||||||
provides=('kst4contest')
|
provides=('kst4contest')
|
||||||
conflicts=('kst4contest-bin' 'kst4contest-git')
|
conflicts=('kst4contest-bin' 'kst4contest-git')
|
||||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/praktimarc/kst4contest/archive/refs/tags/v${pkgver}.tar.gz")
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/praktimarc/kst4contest/archive/refs/tags/v${pkgver}.tar.gz")
|
||||||
@@ -19,7 +19,12 @@ build() {
|
|||||||
export JAVA_HOME=$(find /usr/lib/jvm -maxdepth 1 -name 'java-21-*' -type d | head -n 1)
|
export JAVA_HOME=$(find /usr/lib/jvm -maxdepth 1 -name 'java-21-*' -type d | head -n 1)
|
||||||
export PATH="${JAVA_HOME}/bin:${PATH}"
|
export PATH="${JAVA_HOME}/bin:${PATH}"
|
||||||
|
|
||||||
./gradlew --offline -S :app-desktop:createDistributable
|
# A Gradle home inside $srcdir keeps the build independent of whatever the
|
||||||
|
# builder's ~/.gradle happens to hold: with --offline against the personal
|
||||||
|
# cache, every dependency added since the last local build broke the package.
|
||||||
|
export GRADLE_USER_HOME="${srcdir}/gradle-home"
|
||||||
|
|
||||||
|
./gradlew --no-daemon -S :app-desktop:createDistributable
|
||||||
|
|
||||||
# package() reads dist/KST4Contest. Application name, icon and the JDK
|
# package() reads dist/KST4Contest. Application name, icon and the JDK
|
||||||
# module list come from app-desktop/build.gradle.kts, so this PKGBUILD no
|
# module list come from app-desktop/build.gradle.kts, so this PKGBUILD no
|
||||||
|
|||||||
Reference in new issue
Block a user