Giter Club home page Giter Club logo

Comments (5)

Vampire avatar Vampire commented on June 22, 2024 1

Just as additional information as I had a cursory look already.
I think to support something like that, you would need annotations that are written in Kotlin so that they can have the property target.
And additionally the description of that target says "annotations with this target are not visible to Java", so you would most probably also need the consuming code in Kotlin so that it can see those annotations with "property" target.

from gradle.

Vampire avatar Vampire commented on June 22, 2024 1

If you read it as

private val _a2: Property<String> = objects.property()

@get:Input
val a2: Provider<String> get() = _a2

it makes more sense.

Besides that as you have a getter, you could actually annotate the getter directly instead of the property already like

private val _a2: Property<String> = objects.property()
val a2: Provider<String> @Input get() = _a2

from gradle.

lptr avatar lptr commented on June 22, 2024 1

We should do this. Not sure when.

from gradle.

ov7a avatar ov7a commented on June 22, 2024

This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.


Another question that might be interesting on this topic is: How will these annotations work with Java Records?

from gradle.

eskatos avatar eskatos commented on June 22, 2024

Note that a2 in the example snippet doesn't make sense as a new property would be returned each time a2 is accessed.

from gradle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.