Skip to content

Commit 97fc4c2

Browse files
committed
Removed background job differentiation
1 parent 85566c8 commit 97fc4c2

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

app/src/processing/app/gradle/GradleJob.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ import java.lang.IllegalStateException
2424

2525
// TODO: Move the error reporting to its own file
2626
// TODO: Move the output filtering to its own file
27-
// TODO: Remove dependency on Editor
28-
abstract class GradleJob{
27+
class GradleJob{
2928
enum class State{
3029
NONE,
3130
BUILDING,

app/src/processing/app/gradle/GradleService.kt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import processing.app.Mode
1010
import processing.app.Platform
1111
import processing.app.Preferences
1212
import processing.app.Sketch
13-
import processing.app.gradle.helpers.ActionGradleJob
1413
import processing.app.ui.Editor
1514
import java.io.*
1615
import kotlin.io.path.createTempDirectory
@@ -20,23 +19,20 @@ import kotlin.io.path.writeText
2019
// TODO: Test offline mode, gradle seems to be included as not needed to be downloaded.
2120
// TODO: Test running examples
2221
// TODO: Report failures to the console
23-
// TODO: Remove dependency on getting mode from Editor
24-
// TODO: Remove dependency on editor (editor is not mockable and not usable in the CLI, or move editor away from JFrame)
2522
// TODO: Highlight errors in the editor
2623

2724
// TODO: ---- FUTURE ----
2825
// TODO: Improve progress tracking
2926
// TODO: PoC new debugger/tweak mode
3027
// TODO: Allow for plugins to skip gradle entirely / new modes
31-
// TODO: Improve background building
28+
// TODO: Add background building
3229
// TODO: Track build speed (for analytics?)
3330

3431
// The gradle service runs the gradle tasks and manages the gradle connection
3532
// It will create the necessary build files for gradle to run
3633
// Then it will kick off a new GradleJob to run the tasks
3734
// GradleJob manages the gradle build and connects the debugger
3835
class GradleService(
39-
// TODO: Move to a mode object after decoupling from Editor
4036
val mode: Mode,
4137
val editor: Editor?,
4238
) {
@@ -55,7 +51,7 @@ class GradleService(
5551
fun run(){
5652
stopActions()
5753

58-
val job = ActionGradleJob()
54+
val job = GradleJob()
5955
job.service = this
6056
job.configure = {
6157
setup()
@@ -68,7 +64,7 @@ class GradleService(
6864
fun export(){
6965
stopActions()
7066

71-
val job = ActionGradleJob()
67+
val job = GradleJob()
7268
job.service = this
7369
job.configure = {
7470
setup()
@@ -84,7 +80,6 @@ class GradleService(
8480

8581
fun stopActions(){
8682
jobs
87-
.filterIsInstance<ActionGradleJob>()
8883
.forEach(GradleJob::cancel)
8984
}
9085

app/src/processing/app/gradle/helpers/ActionGradleJob.kt

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/src/processing/app/gradle/helpers/BackgroundGradleJob.kt

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)