Giter Club home page Giter Club logo

Comments (8)

n0mer avatar n0mer commented on August 11, 2024

@pluttrell probably this is intruduced by this commit:

68d9436#diff-c197962302397baf3a4cc36463dce5ea

from gradle-git-properties.

n0mer avatar n0mer commented on August 11, 2024

we are still using https://github.com/ajoberstar/gradle-git (latest release 1.7.2 from Jun 9, 2017).

grgit is a new project - https://github.com/ajoberstar/grgit

Hence the conflict :)

from gradle-git-properties.

tha2015 avatar tha2015 commented on August 11, 2024

Analysis:

gradle-git-properties-1.4.21.jar uses GrgitPlugin class (from gradle-git-1.7.2.jar) which uses GrgitException (from grgit-1.9.3.jar)
When adding grgit 2.1.1 plugin, grgit-1.9.3.jar is replaced by grgit-2.1.1.jar (which doesn't have GrgitException), that's why the issue happened.

Solutions:

  1. One possible solution is to upgrade gradle-git-properties to use grgit-2.1.1 (instead of gradle-git-1.7.2.jar+grgit-1.9.3) because grgit-2.1.1 alone is equivalent to (gradle-git-1.7.2.jar+grgit-1.9.3). But because grgit 2.x requires Java 8 only, it means gradle-git-properties will not be able to support Java versions < 8

  2. Another solution is to exclude gradle-git-1.7.2.jar (and also grgit-1.9.3.jar ) from Gradle classpath by replacing

plugins {
    id "org.ajoberstar.grgit" version "2.1.1"
    id "com.gorylenko.gradle-git-properties" version "1.4.21"
}

with

buildscript {
    repositories {
      maven {
        url "https://plugins.gradle.org/m2/"
      }
    }
    dependencies {
        classpath ("gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.4.21") {
          exclude group: "org.ajoberstar", module: "gradle-git"
        }
        classpath "org.ajoberstar:grgit:2.1.1"
    }
}
apply plugin: "com.gorylenko.gradle-git-properties"
apply plugin: "org.ajoberstar.grgit

from gradle-git-properties.

pluttrell avatar pluttrell commented on August 11, 2024

I think you’ll want to upgrade to grgit 2.x at some point, so I think the Java 8 requirement is inevitable.

If you want to maintain support for older versions, perhaps keep one branch for that purpose and move master and the next major version to use grgit 2.x.

I also wonder how much demand there is for patches that support pre-Java 8. Java 8 has been out for four years this month. And Java 9 has been out for nearly 5 months.

from gradle-git-properties.

damienbeaufils avatar damienbeaufils commented on August 11, 2024

I think it makes sense to support only Java 8 and above: Java 8 is a LTS version, Java 10 is expected to be released in 2 weeks now, and Java 11 LTS in 6 months.
I think a library like gradle-git-properties should support the LTS versions.
Furthermore, Spring Boot 2.0 requires at least Java 8.

from gradle-git-properties.

tha2015 avatar tha2015 commented on August 11, 2024

I believe that there are still a lot of people using Java 6 or older versions. The best solution would be supporting two branches (like 2.x for Java 8 and 1.x for pre-Java 8). But I don't think we have enough people to help with maintaining both branches :-(

from gradle-git-properties.

tha2015 avatar tha2015 commented on August 11, 2024

I've merged the fix for this issue to the master branch. From now on, the plugin will use grgit 2.1.1 and will support only Java 8+. I also updated README.md to clarify Java 8+ requirement.

from gradle-git-properties.

tha2015 avatar tha2015 commented on August 11, 2024

Should be fixed in next version 1.4.22

from gradle-git-properties.

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.