Skip to content

Commit

Permalink
trying to clean up build.gradle...
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharlottes committed Aug 26, 2023
1 parent c009386 commit 7d90677
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,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 @@ -61,8 +63,10 @@ task dexify(type: Jar){
from(zipTree(jarArtifact), zipTree(dexedArtifact))
}

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

tasks.withType(JavaCompile){
targetCompatibility = 8
Expand Down

0 comments on commit 7d90677

Please sign in to comment.