Comments (8)
@pluttrell probably this is intruduced by this commit:
68d9436#diff-c197962302397baf3a4cc36463dce5ea
from gradle-git-properties.
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.
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:
-
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
-
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.
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.
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.
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.
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.
Should be fixed in next version 1.4.22
from gradle-git-properties.
Related Issues (20)
- Gradle 8 compatiblity: Missing task dependency on processResources when setting `gitPropertiesResourceDir`
- Plugin should not default to using overlapping task outputs
- Issue with Spring Boot when we create Image HOT 2
- com.gorylenko.GenerateGitPropertiesTask' property 'gitProperties' is missing an input or output annotation? HOT 1
- how can i put the properties file into the jar using johnrengelman shadowJar
- Some properties make builds non incremental when it's expected to be HOT 1
- Deprecation warning for unreadable inputs
- Plugin not accessible using https://plugins.gradle.org/m2/ repo HOT 1
- No artifact of plugin at plugins.gradle.org above version 2.2.4 HOT 1
- Can this be published to maven central
- HEAD instead of branch name in TeamCity
- Upgrade to grgit 5 https://github.com/ajoberstar/grgit/releases/tag/5.0.0
- jgit save config lock file exception on CI
- Configuration cache problems in Gradle 8.1 HOT 8
- Document which files are used in order to get the functionality to work
- Better communication of exceptions in GitDirLocator
- Disable generateGitProperties task when executing only for tests
- `generateGitProperties` fails when Git's `core.fsmonitor` is enabled HOT 2
- Sometimes after a clean followed by clean build git.properties is not being generated HOT 2
- Provide mechanism to configure length of git commit abbrev
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-git-properties.