Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
richturner committed May 3, 2024
1 parent 6b74a6b commit 47d6afa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions deployment/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ task license {
}

task installDist(type: Copy) {
duplicatesStrategy DuplicatesStrategy.EXCLUDE
dependsOn (parent.getTasksByName('installDist', true).findAll {
// Don't create circular dependency or depend on built in openremote submodule apps
it.project != project && !it.project.path.startsWith(":openremote:ui:app")
Expand Down
4 changes: 2 additions & 2 deletions project.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def createTSGeneratorConfigForModel(String outputFileName, Project...customProje
}
return config
}
def createTSGeneratorConfigForClient(String outputFileName, Project...customProjectsToScan) {
def createTSGeneratorConfigForClient(String outputFileName, File modelInfoJson, Project...customProjectsToScan) {
def config = createTSGeneratorConfig(true, outputFileName, customProjectsToScan) <<
{
extensions = [
Expand All @@ -251,7 +251,7 @@ def createTSGeneratorConfigForClient(String outputFileName, Project...customProj
cz.habarta.typescript.generator.ModuleDependency.module(
"model",
"Model",
new File("$buildDir/typescript-generator-info.json"),
modelInfoJson,
(String) null,
(String) null
)
Expand Down
8 changes: 2 additions & 6 deletions ui/component/rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ dependencies {
implementation "com.fasterxml.jackson.module:jackson-module-parameter-names:$jacksonVersion"
}

// This seems hacky but it is the only way to get the closure from the method call
project.task(Collections.singletonMap(Task.TASK_TYPE, cz.habarta.typescript.generator.gradle.GenerateTask), "generateTypescriptModelInfo")
generateTypescriptModelInfo createTSGeneratorConfigForModel("$buildDir/model.ts", findProject(":model"))

generateTypeScript createTSGeneratorConfigForClient("src/restclient.ts", findProject(":model"))
generateTypeScript.dependsOn(generateTypescriptModelInfo)
generateTypeScript createTSGeneratorConfigForClient("src/restclient.ts", new File("${project(":ui:component:model").projectDir}/src/typescript-generator-info.json"), project(":model"))
generateTypeScript.dependsOn resolveTask(":ui:component:model:generateTypeScript")

clean {
doLast {
Expand Down

0 comments on commit 47d6afa

Please sign in to comment.