gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
92 stars 8 forks source link

Source Dependencies: Wired/Unnecessary `version {}` block #895

Closed StefMa closed 5 years ago

StefMa commented 5 years ago

I just read and test a little bit with the source dependencies feature.

While the syntax for the "git-tag as version" makes sense to me:

implementation 'org.gradle.cpp-samples:utilities:1.0'

the syntax for "other branches" does not:

dependencies {
    implementation('org.gradle.cpp-samples:utilities') {
        version {
            branch = 'release'
        }
    }
}

Expected Behavior

Branches (and maybe git-hashes (see #883 )) can be used as "normal gradle version":

implementation 'org.gradle.cpp-samples:utilities:[TAG,BRANCH OR HASH]'

Users may be confused about the new syntax (the version{} block) they have to use. Because a BRANCH or HASH would specify the version of the dependency.

Current Behavior

We have to add a version {} block to the configuration/dependency which defines the version of the dependency.

big-guy commented 5 years ago

This is intentional. This is part of some other work for defining version constraints that represent how that version should be interpreted.