Skip to content

Commit

Permalink
Make icon and splash screen generated code (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Borewit <[email protected]>
  • Loading branch information
Borewit and Borewit authored Jan 30, 2023
1 parent 5b10eba commit 400f973
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,18 @@ jar {
}
}

def generatedDir = "$buildDir/generated"
def generatedSources = "$generatedDir/sources"
def generatedResources = "$generatedDir/resources"
def generatedImages = "$generatedResources/images"

sourceSets {
main {
java {
srcDirs = ['src/main/java', 'build/generated/sources/xjc/java/main']
srcDirs = ['src/main/java', "$generatedSources/xjc/java/main"]
}
resources {
srcDirs = ['src/main/resources']
srcDirs = ['src/main/resources', generatedResources]
}
}
}
Expand All @@ -169,9 +174,11 @@ task makePngIcon(type: Svg2PngTask) {
source = new File('src/main/svg/listFix() icon.svg')
width = 64
height = 64
destination = new File('src/main/resources/images/icon.png')
destination = new File("$generatedImages/icon.png")
}

processResources.dependsOn makePngIcon

task generateSplashScreenWithVersion(type: Copy) {
group = 'graphics'
from 'src/main/svg/listFix() logo.svg'
Expand All @@ -184,10 +191,10 @@ task makeSplashScreen(type: Svg2PngTask, dependsOn: generateSplashScreenWithVers
source = new File("$buildDir/generated-src/listFix() logo.svg")
width = 400
height = 160
destination = new File('src/main/resources/images/listfixSplashScreen.png')
destination = new File("$generatedImages/listfixSplashScreen.png")
}

rootProject.tasks.getByName('compileJava').dependsOn makeSplashScreen
processResources.dependsOn makeSplashScreen

task makeIcon (type: Svg2IcoTask) {
group = 'graphics'
Expand Down
Binary file removed src/main/resources/images/icon.png
Binary file not shown.
Binary file removed src/main/resources/images/listfixSplashScreen.png
Binary file not shown.

0 comments on commit 400f973

Please sign in to comment.