Git Product home page Git Product logo

catalog's People

Contributors

arnyminerz avatar flavioarfaria avatar msfjarvis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

catalog's Issues

KtDoc arguments don't get transferred correctly

When adding KtDoc contents to an string's content, for example:

...
    <!--
    Welcomes the user to the app
    @author Arnau Mora
    @since 20221206
    -->
    <string name="welcome">Welcome, user!</string>
...

Since the content is indented, this is the comment that gets generated:

/**
 * Welcomes the user to the app
 *     @author Arnau Mora
 *     @since 20221206
 */
context(Context)
@Composable
@ReadOnlyComposable
public inline fun Strings.welcome(): CharSequence = stringResource(R.string.welcome)

Maybe trimming all the lines that start with spaces and @ could be a fix. Or simply trimming each line would fix it.

Drop direct dependency on AGP and KGP from catalog-gradle-plugin

Catalog's Gradle plugin currently includes dependencies on both the Android and Kotlin Gradle plugins which forces an additional set of these rather large and unnecessary transitive dependencies being included in the dependency graphs of end users. Since Catalog generates Kotlin code for use in Android apps, it is very safe to assume that both these dependencies will already exist on the plugin classpath of users.

Lowering these from implementation to compileOnly will be a sufficient resolution for this.

Prior art

Composable strings get defined twice

Hi, I've been trying to set up the plugin to be used with Jetpack Compose, and I have the following string:

<string name="welcome">Welcome back!</string>

The issue is that it gets generated twice, one for Context context, and the other for the Fragment context:

context(Context)
@Composable
@ReadOnlyComposable
public inline fun Strings.welcome(): CharSequence = stringResource(R.string.welcome)

context(Fragment)
@Composable
@ReadOnlyComposable
public inline fun Strings.welcome(): CharSequence = stringResource(R.string.welcome)

Then, when I try to call

com.flaviofaria.catalog.runtime.compose.Strings.welcome()

This is thrown:

None of the following functions can be called with the arguments supplied.
Strings.welcome() defined in com....
Strings.welcome() defined in com....

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.