Hi, and thanks for this great tool! I'm trying to...
# refreshversions
j
Hi, and thanks for this great tool! I'm trying to add some grouping rules for a couple of androidx libraries, but it seems to me that they are ignored. Here's my rules file:
Copy code
androidx.compose.*:*
^^^^^^^^^^^^^^^^

androidx.paging:paging-compose
^^^^^^^^^^^^^^^.       ^^^^^^^

com.google.dagger:hilt-compiler
    ^^^^^^^^^^^^^.^^^^
Note that the last entry with the
hilt-compiler
is working fine, which indicates to me that I've set this up correctly. When I run gradle sync or refreshVersions, I get this in my `versions.properties`:
Copy code
version.androidx.compose.foundation=1.0.0-alpha10

version.androidx.compose.material=1.0.0-alpha10

version.androidx.compose.runtime=1.0.0-alpha10

version.androidx.compose.ui=1.0.0-alpha10

version.androidx.paging=2.1.2
But I was expecting this:
Copy code
version.androidx.compose=1.0.0-alpha10

version.androidx.paging=2.1.2

version.androidx.paging.compose=1.0.0-alpha05
Is there something wrong with my androidx rules, or do they conflict with the built-in ones maybe? Or have I misunderstood this feature completely? 😅
n
redefining rules where they already match builtins did not work for me either when i tried
j
Right, but they also have some builtin rules for dagger/hilt, and my additional rule works fine in that case 🤔
@louiscad do you have any idea what's going on here?
l
@Johan Reitan The longest rule should win because it's considered as more specific, but I believe there's also a bug because I have one case where it didn't work.
j
I see, but these rules are unique to anything defined in the library i.e., there is no longer rule containing either
androidx.compose
or
androidx.paging.compose
. That is if this rule doesn't clash:
Copy code
androidx.*:*
^^^^^^^^^^
But then I don't see how the other builtin androidx rules would work...
l
Can you open an issue on GitHub so this doesn't get lost once I work again on this area of the project?
j
Will do. BTW, as this comment points out, I think there's something fishy in the sample project with regards to this
Scratch that, the rule for what he's expecting isn't actually there Looks like that rule is working fine after removing the duplicates from
versions.properties
l
@Johan Reitan Is that something you can constantly reproduce: the rule is ignored if unused by the entries in
versions.properties
?
j
@louiscad No, the rule in the kotlin sample seems to work fine, but the plugin doesn't remove the unnecessary, duplicate entries in
versions.properties
. After removing those entries, the sample seems to work correctly, not adding the duplicates back. I thought maybe issue #312 was related to my issue, but it seems that's another issue.