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 <[email protected]>
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 <[email protected]> wrote:
>
>> I've created this issue:
>> https://github.com/jOOQ/jOOQ/issues/16842
>>
>>
>>
>> On Wed, Jun 19, 2024 at 6:06 PM Lukas Eder <[email protected]> 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 <[email protected]> wrote:
>>>
>>>> Hi Kevin
>>>>
>>>> May I tempt you to kindly provide a reproducer
>>>>
>>>> Lukas
>>>>
>>>> On Wednesday, June 19, 2024, Kevin Jones <[email protected]>
>>>> 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 [email protected].
>>>>> 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 [email protected].
>> 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 [email protected].
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO4NnNhQu-x5SuJGjw0aPqKh8q-PS_LfONKV4StM3EDpOQ%40mail.gmail.com.

Reply via email to