Are you afraid of Gradle because I'm afraid of him?

    I will say right away - I'm completely new to Gradle.
    Half of the working day, instead of writing code containing my family, I spent on finding out that out of 150 lines of the config, I had to fix one by changing it classpath 'com.jakewharton.sdkmanager:gradle-plugin:+to com.jakewharton.sdkmanager:gradle-plugin:0.10.1.
    The program started yesterday and stopped today. Do you know what I did wrong today? But nothing. Absolutely the same code and the same configs. Not a single file has been changed.
    A thoughtful or experienced programmer already guessed that the “+” sign means that you need to download the latest version of the library and something is loaded wrong. Yes, this is part of the problem, but not all. The library itself did not spoil anything. She just had a dependency on another - which spoiled.
    Anyway, what kind of mod to upload non-tested libraries to a common repository? Under Maven this was not!

    And if interested, I will describe how it looked.
    The application on Android has stopped running from the IDE. To understand that it is not the IDE that is to blame, but the Graddle, which collects the application, it took time. By the way, everything was compiled perfectly. Until the end. But it did not start.
    I searched for an error, found on the Internet that the plugin had a bug in the latest version. It is only necessary to return the old, 11th and it will work. I look in configs and see that 11th is already standing. In general, I was perverted for a long time, until I realized that despite the fact that the 11th is registered, the latter is used anyway.
    In Gradle, I did not find how to look at the dependencies of the plugins (but there is such an opportunity in Maven). But by commenting the lines and restarting the build again and again I found a plug-in, which in the new version uses the new version of the ill-fated

    Why did this even happen?
    This situation happened because of my inexperience. When I started the project, not being an expert on Gradle, I just copied the config posted on the git hub. Yes. I know that copy-paste is evil, but a beginner needs to start somewhere. I admit that the fault lies entirely with me, but it would be nice if new users were somehow protected from such problems.

    To be not just a crybaby, but an erudite crybaby, I will try to make my suggestions into the void:
    Well, if the plugin version is directly indicated in the config, then you can somehow inform the user that another will be used.
    Yes, it would be nice to enter a command showing the plugin dependency tree.
    No need to upload poorly tested plugins to the public.
    The ability to put "+" must be prohibited. At least at the highest level. That is, "10. +" is still possible, but just "+" - ATATA!

    I had such an exciting 5-hour adventure in the world of Gradle today.
    In general, newcomers to Gradle, do not step on my rake, and old-timers - scold me at all, for my incompetence.

    Also popular now: