Skip to content

Commit

Permalink
trying to clean up build.gradle...
Browse files Browse the repository at this point in the history
trying to clean up build.gradle...

trying to clean up build.gradle...
  • Loading branch information
Sharlottes committed Aug 26, 2023
1 parent dd07c5f commit ff5f879
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew buildDex
run: ./gradlew deploy

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
24 changes: 8 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
}
apply plugin: "java"

version '1.0'

ext{
sdkRoot = System.getenv("ANDROID_HOME")
Expand All @@ -9,9 +9,6 @@ ext{
artifactFilename = "Informatis.jar"
}

group "sharlotte"
sourceCompatibility = 17

sourceSets.main {
java.srcDir("src/")
resources.srcDir("assets/")
Expand All @@ -34,6 +31,8 @@ jar.archiveFileName.set("raw-$artifactFilename")

def isWindows = System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows")
task dexify(type: Jar){
dependsOn "jar"

archiveFileName.set(artifactFilename)

final File jarArtifact = new File(tasks.jar.archiveFile.get().asFile.parent, "raw-$artifactFilename"),
Expand Down Expand Up @@ -64,16 +63,9 @@ task dexify(type: Jar){
from(zipTree(jarArtifact), zipTree(dexedArtifact))
}

tasks.named("dexify").configure { dependsOn(":jar") }
task buildDex dependsOn "build", "dexify"

task buildMove(dependsOn: build) {
doLast {
copy {
from "build/libs/raw-Informatis.jar"
into System.getenv("destination")
}
}
task deploy(type: Jar) {
dependsOn dexify
dependsOn "build"
}

tasks.withType(JavaCompile){
Expand Down

0 comments on commit ff5f879

Please sign in to comment.