Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
cache-disabled: true
# specify the build version, overrides whatever is in the build.gradle file
arguments: build -PoverrideVersion=${{ env.VERSION }}

Expand All @@ -45,5 +45,4 @@ jobs:
name: Neko Detector ${{ env.VERSION }}
draft: true
prerelease: false
files: |
jarscanner-${{ env.VERSION }}.jar
files: build/libs/*
20 changes: 17 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
plugins {
id "java"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group 'me.cortex'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8
targetCompatibility = 1.8

java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}

repositories {
mavenCentral()
}

// Reproducible builds
// https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}

dependencies {
implementation 'org.ow2.asm:asm:9.5'
implementation 'org.ow2.asm:asm-tree:9.5'
Expand All @@ -20,13 +34,13 @@ test {
useJUnitPlatform()
}


tasks.shadowJar {
archiveClassifier.set("")
manifest {
attributes "Main-Class": "me.cortex.jarscanner.Main"
}
}

tasks.build {
dependsOn(shadowJar)
if (project.hasProperty("overrideVersion")) {
Expand All @@ -39,4 +53,4 @@ jar {
manifest {
attributes 'Main-Class': 'me.cortex.jarscanner.Main'
}
}
}