File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1+ kotlin version: 2.0.20
2+ error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
3+ 1. Kotlin compile daemon is ready
4+
Original file line number Diff line number Diff line change @@ -40,13 +40,13 @@ class ProcessingPlugin @Inject constructor(private val objectFactory: ObjectFact
4040
4141 val preferences = File (settingsFolder, " preferences.txt" )
4242 val prefs = Properties ()
43- prefs.load(preferences.inputStream())
43+ if (preferences.exists()) prefs.load(preferences.inputStream())
4444 prefs.setProperty(" export.application.fullscreen" , " false" )
4545 prefs.setProperty(" export.application.present" , " false" )
4646 prefs.setProperty(" export.application.stop" , " false" )
47- prefs.store(preferences.outputStream(), null )
47+ if (preferences.exists()) prefs.store(preferences.outputStream(), null )
4848
49- val sketchbook = prefs.getProperty(" sketchbook.path.four" )
49+ val sketchbook = prefs.getProperty(" sketchbook.path.four" ) ? : ( " ${ System .getProperty( " user.home " )} /.processing " )
5050
5151 // Apply the Java plugin to the Project
5252 project.plugins.apply (JavaPlugin ::class .java)
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class ProcessingPluginTest{
99 @Test
1010 fun testPluginAddsSketchTask (){
1111 val project = ProjectBuilder .builder().build()
12- project.pluginManager.apply (" processing.java .gradle" )
12+ project.pluginManager.apply (" org.processing .gradle" )
1313
1414 assert (project.tasks.getByName(" sketch" ) is Task )
1515 }
@@ -23,7 +23,7 @@ class ProcessingPluginTest{
2323 val buildFile = folder.newFile(" build.gradle.kts" )
2424 buildFile.writeText("""
2525 plugins{
26- id("processing.java .gradle")
26+ id("org.processing .gradle")
2727 }
2828 """ .trimIndent())
2929
@@ -37,12 +37,12 @@ class ProcessingPluginTest{
3737 }
3838 """ .trimIndent())
3939
40- val result = GradleRunner .create()
40+ GradleRunner .create()
4141 .withProjectDir(folder.root)
4242 .withArguments(" build" )
4343 .withPluginClasspath()
4444 .build()
4545
46- assert (folder.root.resolve(" .processing /generated/pde/main" ).exists())
46+ assert (folder.root.resolve(" build /generated/pde/main" ).exists())
4747 }
4848}
You can’t perform that action at this time.
0 commit comments