Giter VIP home page Giter VIP logo

jpos-gradle-plugin's Introduction

jpos-gradle-plugin's People

Contributors

ar avatar avolpe avatar barspi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jpos-gradle-plugin's Issues

Plugin makes build fail in non git project

The plugin makes the jar task to depend on createGitRevision task, that fails if this is not a git repository, the build even fails after performing a git init with a NoHeadException.

There are many options for this:

  1. Not adding the dependency if the project is not in a git repository, and maybe not creating the task at all.
  2. Letting a project property select if we want to run the task.
  3. Ignore the git exception if a project property is set.
  4. All of the above.

The easier to implement are 2 and 3.

I don't know if there is an easy way of asking jGit about whether the project is in a git repository or not, without using hard coded literals for implementing 1. But also for this we would need to ask git specific questions from the JPOSPlugin class, of course we can relay that to a GitRevisonTask method.

Gradle warning with createBuildTimestamp task

When running the test task, the following warning is printed:

  - Gradle detected a problem with the following location: 'repo/modules/module/build/resources/main'. Reason: Task ':modules:module:compileTestJava' uses this output of task ':modules:module:createBuildTimestamp' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: 'repo/modules/module/build/resources/main'. Reason: Task ':modules:module:compileTestJava' uses this output of task ':modules:module:createGitRevision' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

We can use this plugin as an example to how to fix those warnings: https://github.com/n0mer/gradle-git-properties/blob/master/src/main/groovy/com/gorylenko/GitPropertiesPlugin.groovy

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.