Giter VIP home page Giter VIP logo

Comments (5)

jsotuyod avatar jsotuyod commented on September 26, 2024

The problem is the order on which you are applying plugins. The staticCodeAnalysis plugin needs to know what kind of project it's dealing with (Java, Android App or Android Lib) to configure it properly, but since you are applying it first, it can't and fails.

For the time being, just change the order to:

apply plugin: 'com.android.application'

plugins {
    id 'com.monits.staticCodeAnalysis' version '2.3.3'
}

Some parts of the plugin are already lazy and ok with this, but clearly not all. I'll try to get this fixed for the next release (2.3.4)

from static-code-analysis-plugin.

Okeanos avatar Okeanos commented on September 26, 2024

I see … but that causes other problems. Notably, the plugins {} statement has to be the first thing in the gradle file according to the specifications:

Error:(3, 0) Cause: startup failed:
build file '<snip>': only buildscript {} and other plugins {} script blocks are allowed before plugins {} blocks, no other statements are allowed

A workaround that does work is using the build script variant and applying the staticCeAnalysis plugin after the android application one.

from static-code-analysis-plugin.

jsotuyod avatar jsotuyod commented on September 26, 2024

@Okeanos You are absolutely right.

I'm raising the priority to this. I originally planed to wait to release 2.3.4 until PMD 5.5.3 / PMD 5.6.0 was available (it has too many improvements), but this one is probably big enough for a release on it's own. I'm working on it as we speak.

from static-code-analysis-plugin.

jsotuyod avatar jsotuyod commented on September 26, 2024

@Okeanos Travis is building to double check my fixes. If everything is good (other than a conscious performance regression on Checkstyle due to the enabling of the results cache), expect a 2.3.4 release later today.

from static-code-analysis-plugin.

jsotuyod avatar jsotuyod commented on September 26, 2024

@Okeanos 2.3.4 has been released. This issue should now be fixed.

Let me know if you have any further issues.

from static-code-analysis-plugin.

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.