In any case, the workaround should be to explicitly create the main source 
set in your build script, yes?

On Thursday, June 20, 2024 at 10:53:52 AM UTC+2 Lukas Eder wrote:

> Thanks a lot for the reproducer, Kevin, that certainly helps save time and 
> regression-test this particular case.
>
> At least, until my next wrong assumption about how gradle works is exposed 
> 😅
>
> On Wed, Jun 19, 2024 at 8:58 PM Kevin Jones <ke...@knowledgespike.com> 
> wrote:
>
>> Hey Lucas, 
>>
>> thanks for looking into this so quickly.
>>
>> This is the repo
>>
>> https://github.com/kevinrjones/jooqtest
>>
>> The line that's causing the issue is in the root build.gradle file:
>>
>> I have this:
>>
>>     tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>() {
>>         compilerOptions.jvmTarget.set(JvmTarget.JVM_21)
>>         dependsOn(tasks["jooqCodegen"])
>>     }
>>
>> I want jooqCodeGen to run when I do a compile and it's the 'dependsOn' 
>> that's causing the issue
>>
>> HTH,
>>
>> Kevin
>>
>>
>>
>> On Wed, Jun 19, 2024 at 5:10 PM Lukas Eder <lukas...@gmail.com> wrote:
>>
>>> I've created this issue:
>>> https://github.com/jOOQ/jOOQ/issues/16842
>>>
>>>
>>>
>>> On Wed, Jun 19, 2024 at 6:06 PM Lukas Eder <lukas...@gmail.com> wrote:
>>>
>>>> OK, I get it now.
>>>>
>>>> Before 3.19.10, we just didn't register any source sets at all, if 
>>>> there was no main source set.
>>>>
>>>> I'm assuming, you manually added the output directory to a source set 
>>>> in your case?
>>>>
>>>> On Wed, Jun 19, 2024 at 5:06 PM Lukas Eder <lukas...@gmail.com> wrote:
>>>>
>>>>> Hi Kevin
>>>>>
>>>>> May I tempt you to kindly provide a reproducer
>>>>>
>>>>> Lukas
>>>>>
>>>>> On Wednesday, June 19, 2024, Kevin Jones <ke...@knowledgespike.com> 
>>>>> wrote:
>>>>>
>>>>>> Hi Lucas,
>>>>>>
>>>>>> I'm using Gradle, which I know you love!
>>>>>>
>>>>>> I've just tried to update my build to 3.19.10, literally by changing 
>>>>>> the JOOQ version number from 3.19.9 to 3.19.10 and the build breaks.
>>>>>>
>>>>>> This is a Compose-Desktop app which is using the Kotlin Multiplatform 
>>>>>> plugin, that uses a couple of source sets, 'destopMain' and 'commonMain' 
>>>>>> . 
>>>>>> Notice that there is on no 'main' sourceset. I put my generated code 
>>>>>> into 
>>>>>> the 'commonMain; sourceset 
>>>>>>
>>>>>> When I synchronize the Gradle build file after updating the JOOQ 
>>>>>> verrsion to 3.19.10 I get
>>>>>>
>>>>>>
>>>>>> Could not create task ':ksstats:compileKotlinDesktop'.
>>>>>> > Could not create task ':ksstats:jooqCodegen'.
>>>>>>    > SourceSet with name 'main' not found.
>>>>>>
>>>>>>
>>>>>> And if I look in the stacjtrace i get:
>>>>>>
>>>>>> Caused by: org.gradle.api.UnknownDomainObjectException: SourceSet 
>>>>>> with name 'main' not found.
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultNamedDomainObjectCollection.createNotFoundException(DefaultNamedDomainObjectCollection.java:529)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultNamedDomainObjectCollection.named(DefaultNamedDomainObjectCollection.java:385)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultNamedDomainObjectCollection.named(DefaultNamedDomainObjectCollection.java:393)
>>>>>> at 
>>>>>> org.jooq.codegen.gradle.CodegenTask.registerSourceSet(CodegenTask.java:104)
>>>>>> at 
>>>>>> org.jooq.codegen.gradle.CodegenPlugin.lambda$configureTask$2(CodegenPlugin.java:99)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:45)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:45)
>>>>>> at 
>>>>>> org.gradle.internal.code.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:122)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction$1.run(DefaultCollectionCallbackActionDecorator.java:110)
>>>>>> at 
>>>>>> org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
>>>>>> at 
>>>>>> org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
>>>>>> at 
>>>>>> org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
>>>>>> at 
>>>>>> org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
>>>>>> at 
>>>>>> org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
>>>>>> at 
>>>>>> org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
>>>>>> at 
>>>>>> org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
>>>>>> at 
>>>>>> org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction.execute(DefaultCollectionCallbackActionDecorator.java:107)
>>>>>> at 
>>>>>> org.gradle.internal.ImmutableActionSet$SetWithManyActions.execute(ImmutableActionSet.java:329)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:262)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultNamedDomainObjectCollection.doAdd(DefaultNamedDomainObjectCollection.java:125)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:256)
>>>>>> at 
>>>>>> org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:1011)
>>>>>> ... 312 more
>>>>>>
>>>>>>
>>>>>> Kevin
>>>>>>
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "jOOQ User Group" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to jooq-user+...@googlegroups.com.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/jooq-user/ee581f48-f50a-404f-9373-f70012d7ab64n%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/jooq-user/ee581f48-f50a-404f-9373-f70012d7ab64n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "jOOQ User Group" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jooq-user+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jooq-user/CAB4ELO5Wx8STSYzK3ctw4fO3U-ivAt0n-j1yJ0m-FhVDDxTJFw%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/jooq-user/CAB4ELO5Wx8STSYzK3ctw4fO3U-ivAt0n-j1yJ0m-FhVDDxTJFw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> -- 
>> Kevin Jones
>> KnowledgeSpike
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jooq-user+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jooq-user/CAKT%3DYsN1%3D9WZorNq7O0vuJqf3oOZAmW52rH5Cosk_5GWy%3D9RBQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/jooq-user/CAKT%3DYsN1%3D9WZorNq7O0vuJqf3oOZAmW52rH5Cosk_5GWy%3D9RBQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/9cf49af7-1a80-4694-9d46-147284575fb1n%40googlegroups.com.

Reply via email to