Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Moved yarn workspace to root of repo (to allow module resolution when using a custom projects)

Rich Turnerc07b581808d6
diff --git a/build.gradle b/build.gradle
index cbcc25105..cb7966347 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,3 +1,10 @@
+apply plugin: 'idea'
+idea {
+ module {
+ excludeDirs += file("node_modules")
+ }
+}
+
allprojects {
apply from: "${findProject(":openremote") != null ? project(":openremote").projectDir : rootDir}/project.gradle"
}
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..ea8fdeab8
--- /dev/null
+++ b/package.json
@@ -0,0 +1,8 @@
+{
+ "private": true,
+ "workspaces": [
+ "ui/app/*",
+ "ui/component/*",
+ "ui/demo/*"
+ ]
+}
diff --git a/ui/app/smart-building-v1/build.gradle b/ui/app/smart-building-v1/build.gradle
index 26f857a36..fc0dbecff 100644
--- a/ui/app/smart-building-v1/build.gradle
+++ b/ui/app/smart-building-v1/build.gradle
@@ -1,5 +1,5 @@
task build {
- dependsOn yarnInstall
+ dependsOn rootProject.tasks.getByName("yarnInstall")
}
task installDist(type: Copy) {
diff --git a/ui/build.gradle b/ui/build.gradle
index 4383fb702..6a467f3c4 100644
--- a/ui/build.gradle
+++ b/ui/build.gradle
@@ -1,12 +1,4 @@
-apply plugin: 'idea'
-idea {
- module {
- excludeDirs += file("node_modules")
- }
-}
-
task build {
- dependsOn yarnInstall
// Add dependency to openremote ui build
if (isCustomProject() && parent == rootProject) {
dependsOn resolveTask(":ui:build")
diff --git a/ui/component/core/build.gradle b/ui/component/core/build.gradle
index f91460271..39a0ebe92 100644
--- a/ui/component/core/build.gradle
+++ b/ui/component/core/build.gradle
@@ -5,7 +5,7 @@ task clean() {
}
task build() {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
npmBuild.dependsOn resolveTask(":ui:component:model:build"), resolveTask(":ui:component:rest:build")
\ No newline at end of file
diff --git a/ui/component/core/src/event.ts b/ui/component/core/src/event.ts
index 1fb1c6340..5f5ffc007 100644
--- a/ui/component/core/src/event.ts
+++ b/ui/component/core/src/event.ts
@@ -316,7 +316,7 @@ abstract class EventProviderImpl implements EventProvider {
console.debug("Event provider scheduling reconnect in " + this._reconnectDelayMillis + "ms");
- this._reconnectTimer = setTimeout(() => {
+ this._reconnectTimer = window.setTimeout(() => {
if (this._disconnectRequested) {
return;
diff --git a/ui/component/core/src/index.ts b/ui/component/core/src/index.ts
index fbd327e05..c36a6f06d 100644
--- a/ui/component/core/src/index.ts
+++ b/ui/component/core/src/index.ts
@@ -526,7 +526,7 @@ export class Manager {
clearInterval(this._keycloakUpdateTokenInterval);
delete this._keycloakUpdateTokenInterval;
}
- this._keycloakUpdateTokenInterval = setInterval(() => {
+ this._keycloakUpdateTokenInterval = window.setInterval(() => {
this.updateKeycloakAccessToken();
}, 10000);
this._onAuthenticated();
diff --git a/ui/component/or-header/build.gradle b/ui/component/or-header/build.gradle
index 56d41d45d..489605e7b 100644
--- a/ui/component/or-header/build.gradle
+++ b/ui/component/or-header/build.gradle
@@ -5,5 +5,5 @@ task clean() {
}
task build() {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
diff --git a/ui/component/or-map/build.gradle b/ui/component/or-map/build.gradle
index c54bae5ce..2a303e1e5 100644
--- a/ui/component/or-map/build.gradle
+++ b/ui/component/or-map/build.gradle
@@ -5,7 +5,7 @@ task clean() {
}
task build() {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
npmBuild.dependsOn resolveTask(":ui:component:rest:build")
\ No newline at end of file
diff --git a/ui/component/or-smart-notify/build.gradle b/ui/component/or-smart-notify/build.gradle
index 56d41d45d..489605e7b 100644
--- a/ui/component/or-smart-notify/build.gradle
+++ b/ui/component/or-smart-notify/build.gradle
@@ -5,5 +5,5 @@ task clean() {
}
task build() {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
diff --git a/ui/component/or-timeline/build.gradle b/ui/component/or-timeline/build.gradle
index 56d41d45d..489605e7b 100644
--- a/ui/component/or-timeline/build.gradle
+++ b/ui/component/or-timeline/build.gradle
@@ -5,5 +5,5 @@ task clean() {
}
task build() {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
diff --git a/ui/component/rest/build.gradle b/ui/component/rest/build.gradle
index ba2608062..58b4ca825 100644
--- a/ui/component/rest/build.gradle
+++ b/ui/component/rest/build.gradle
@@ -54,6 +54,6 @@ clean {
}
}
-build.dependsOn npmBuild
+build.dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
npmBuild.dependsOn resolveTask(":ui:component:model:build"), generateTypeScript
\ No newline at end of file
diff --git a/ui/demo/demo-core/build.gradle b/ui/demo/demo-core/build.gradle
index 2aa1b243b..0f9236645 100644
--- a/ui/demo/demo-core/build.gradle
+++ b/ui/demo/demo-core/build.gradle
@@ -5,7 +5,7 @@ task clean() {
}
task build() {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
npmBuild.dependsOn resolveTask(":ui:component:core:build")
\ No newline at end of file
diff --git a/ui/demo/demo-or-header/build.gradle b/ui/demo/demo-or-header/build.gradle
index 71cf5c0f7..694777f3a 100644
--- a/ui/demo/demo-or-header/build.gradle
+++ b/ui/demo/demo-or-header/build.gradle
@@ -1,7 +1,7 @@
buildDir = "dist"
task build {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
task clean() {
diff --git a/ui/demo/demo-or-map/build.gradle b/ui/demo/demo-or-map/build.gradle
index 71cf5c0f7..694777f3a 100644
--- a/ui/demo/demo-or-map/build.gradle
+++ b/ui/demo/demo-or-map/build.gradle
@@ -1,7 +1,7 @@
buildDir = "dist"
task build {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
task clean() {
diff --git a/ui/demo/demo-rest/build.gradle b/ui/demo/demo-rest/build.gradle
index 2aa1b243b..0f9236645 100644
--- a/ui/demo/demo-rest/build.gradle
+++ b/ui/demo/demo-rest/build.gradle
@@ -5,7 +5,7 @@ task clean() {
}
task build() {
- dependsOn npmBuild
+ dependsOn rootProject.tasks.getByName("yarnInstall"), npmBuild
}
npmBuild.dependsOn resolveTask(":ui:component:core:build")
\ No newline at end of file
diff --git a/ui/package.json b/ui/package.json
deleted file mode 100644
index f312b34d8..000000000
--- a/ui/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "private": true,
- "workspaces": [
- "app/*",
- "component/*",
- "demo/*"
- ]
-}