-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix gradle isssue with packaging generated shaders (#273)
Previously copyTask would run before shaders are actually generated, so they wouldn't be included correctly on the first try after a clean build. This changes a few things: - copyTask must now run after the native build that generates shaders, and before generate assets task - subprojects specify a list of assets, and a task defined at the root build.gradle copies them - the shaders are copied into a build folder, instead of a new assets folder in a subproject
- Loading branch information
Showing
9 changed files
with
94 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
task copyTask { | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/shaders/spv' | ||
into 'assets/basic/shaders/spv' | ||
include '*.spv' | ||
} | ||
} | ||
ArrayList projectAssets = [ | ||
"basic/shaders/spv" | ||
] | ||
|
||
project.assets = projectAssets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
task copyTask { | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/shaders/spv' | ||
into 'assets/basic/shaders/spv' | ||
include '*.spv' | ||
} | ||
} | ||
ArrayList projectAssets = [ | ||
"basic/shaders/spv" | ||
] | ||
|
||
project.assets = projectAssets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
task copyTask { | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/shaders/spv' | ||
into 'assets/basic/shaders/spv' | ||
include '*.spv' | ||
} | ||
} | ||
ArrayList projectAssets = [ | ||
"basic/shaders/spv" | ||
] | ||
|
||
project.assets = projectAssets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
task copyTask { | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/shaders/spv' | ||
into 'assets/basic/shaders/spv' | ||
include '*.spv' | ||
} | ||
} | ||
ArrayList projectAssets = [ | ||
"basic/shaders/spv" | ||
] | ||
|
||
project.assets = projectAssets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
task copyTask { | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/models' | ||
into 'assets/basic/models' | ||
} | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/shaders/spv' | ||
into 'assets/basic/shaders/spv' | ||
include '*.spv' | ||
} | ||
copy { | ||
from rootProject.ext.assetsPath + '/common/textures' | ||
into 'assets/common/textures' | ||
} | ||
copy { | ||
from rootProject.ext.assetsPath + '/materials/shaders' | ||
into 'assets/materials/shaders' | ||
} | ||
copy { | ||
from rootProject.ext.thirdPartyAssetsPath + '/poly_haven' | ||
into 'assets/poly_haven' | ||
} | ||
} | ||
ArrayList projectAssets = [ | ||
"basic/models", | ||
"basic/shaders/spv", | ||
"common/textures", | ||
"materials/shaders/spv", | ||
] | ||
|
||
ArrayList projectThirdPartyAssets = [ | ||
"poly_haven" | ||
] | ||
|
||
project.assets = projectAssets | ||
project.thirdPartyAssets = projectThirdPartyAssets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
task copyTask { | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/shaders/spv' | ||
into 'assets/basic/shaders/spv' | ||
include '*.spv' | ||
} | ||
copy { | ||
from rootProject.ext.assetsPath + '/gbuffer/shaders/spv' | ||
into 'assets/gbuffer/shaders/spv' | ||
include '*.spv' | ||
} | ||
copy { | ||
from rootProject.ext.assetsPath + '/materials/textures' | ||
into 'assets/materials/textures' | ||
} | ||
} | ||
ArrayList projectAssets = [ | ||
"basic/shaders/spv", | ||
"gbuffer/shaders/spv", | ||
"materials/textures" | ||
] | ||
|
||
project.assets = projectAssets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
task copyTask { | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/shaders/spv' | ||
into 'assets/basic/shaders/spv' | ||
include '*.spv' | ||
} | ||
copy { | ||
from rootProject.ext.assetsPath + '/fishtornado' | ||
into 'assets/fishtornado' | ||
} | ||
} | ||
ArrayList projectAssets = [ | ||
"basic/shaders/spv", | ||
"fishtornado" | ||
] | ||
|
||
project.assets = projectAssets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
task copyTask { | ||
copy { | ||
from rootProject.ext.assetsPath + '/basic/shaders/spv' | ||
into 'assets/basic/shaders/spv' | ||
include '*.spv' | ||
} | ||
copy { | ||
from rootProject.ext.assetsPath + '/fishtornado' | ||
into 'assets/fishtornado' | ||
} | ||
} | ||
ArrayList projectAssets = [ | ||
"basic/shaders/spv", | ||
"fishtornado" | ||
] | ||
|
||
project.assets = projectAssets |