Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Gradle 7.x #12

Open
Cliabhach opened this issue Jan 26, 2022 · 0 comments
Open

Compatibility with Gradle 7.x #12

Cliabhach opened this issue Jan 26, 2022 · 0 comments

Comments

@Cliabhach
Copy link

Expected behaviour

Building a multiplatform gradle module with Gradle 7.2 and the Hagu plugin should not bring up any errors.

Actual behaviour

Executing a gradle build (in my case, ./gradlew assemble) causes the following message to appear:

A problem was found with the configuration of task ':library:buildHagu' (type 'HaguTask').
  - In plugin 'com.karumi.hagu' type 'com.karumi.hagu.plugin.HaguTask' property 'generatedSourceOutput' is annotated with @PathSensitive but that is not allowed for 'OutputDirectory' properties.

Steps to reproduce

Include the following in the top-level settings.gradle file:

pluginManagement {
    resolutionStrategy {
        eachPlugin {
            if (it.requested.id.id == 'com.karumi.hagu') {
                useModule('com.karumi.hagu:gradle-plugin:0.1.2')
            }
        }
    }
    repositories {
        gradlePluginPortal()
        mavenCentral()
    }
}

Include this in the top-level build.gradle file:

plugins {
    id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

Prepend this to the multiplatform module's build.gradle file:

plugins {
    id 'org.jetbrains.kotlin.multiplatform'
    id 'com.karumi.hagu'
}

Version of the library

0.1.2

Additional thoughts

I admit that I'm not entirely sure of what the right approach is here. Perhaps it makes sense to remove the PathSensitive annotation? Or maybe I need to fix something in my project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant