Skip to content

Commit eec9a81

Browse files
committed
fix(ci): workflow build
1 parent 82722e9 commit eec9a81

4 files changed

Lines changed: 44 additions & 29 deletions

File tree

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: HostFlow Build
1+
name: Hostflow Build
22

33
on:
44
push:
@@ -10,22 +10,22 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v4
1414

15-
- name: Set up JDK 21
16-
uses: actions/setup-java@v3
17-
with:
18-
java-version: '21'
19-
distribution: 'temurin'
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v3
17+
with:
18+
java-version: '21'
19+
distribution: 'temurin'
2020

21-
- name: Setup Gradle
22-
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
21+
- name: Setup Gradle
22+
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
2323

24-
- name: Build with Gradle
25-
run: ./gradlew build --full-stacktrace
24+
- name: Build with Gradle
25+
run: ./gradlew build --full-stacktrace
2626

27-
- name: Upload Artifact
28-
uses: actions/upload-artifact@v4
29-
with:
30-
name: Artifacts
31-
path: openlogin-universal/build/libs/HostFlowMalwareRemover.jar
27+
- name: Upload Artifact
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: Artifacts
31+
path: build/libs/HostflowMalwareRemover.jar

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ plugins/
88
plugins-clean/
99
/.idea/
1010
/.gradle/
11+
build/

build.gradle

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
11
plugins {
22
id 'java'
3-
id "com.github.johnrengelman.shadow" version "8.1.1"
3+
id 'idea'
4+
id 'com.gradleup.shadow' version '9.3.1'
45
}
56
tasks.build.dependsOn('shadowJar')
67

78
group 'com.nickuc.antimalware'
89
version '1.0-SNAPSHOT'
910

11+
def targetJavaVersion = 8
12+
java {
13+
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
14+
sourceCompatibility = javaVersion
15+
targetCompatibility = javaVersion
16+
if (JavaVersion.current() < javaVersion) {
17+
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
18+
}
19+
disableAutoTargetJvm()
20+
}
21+
22+
tasks.withType(JavaCompile).configureEach {
23+
options.encoding = 'UTF-8'
24+
}
25+
1026
repositories {
1127
mavenCentral()
1228
}
1329

1430
dependencies {
1531
def asmVersion = "9.9.1"
16-
compile 'org.ow2.asm:asm:' + asmVersion
17-
compile 'org.ow2.asm:asm-commons:' + asmVersion
18-
compile 'org.ow2.asm:asm-tree:' + asmVersion
32+
implementation 'org.ow2.asm:asm:' + asmVersion
33+
implementation 'org.ow2.asm:asm-commons:' + asmVersion
34+
implementation 'org.ow2.asm:asm-tree:' + asmVersion
1935

2036
def lombok = 'org.projectlombok:lombok:1.18.42'
2137
compileOnly lombok
@@ -32,13 +48,11 @@ jar {
3248
}
3349
}
3450

35-
shadowJar {
36-
archiveName("HostflowMalwareRemover.jar")
51+
tasks.shadowJar {
52+
dependsOn tasks.compileJava
53+
archiveFileName = 'HostflowMalwareRemover.jar'
3754
}
3855

39-
compileJava {
40-
options.encoding('UTF-8')
41-
42-
sourceCompatibility('1.8')
43-
targetCompatibility('1.8')
44-
}
56+
tasks.build {
57+
dependsOn tasks.shadowJar
58+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)