GradleSassPlugin icon indicating copy to clipboard operation
GradleSassPlugin copied to clipboard

NullPointerException

Open kgeis opened this issue 8 years ago • 9 comments

Simple use case, version 1.2.2, calling mainSass

Caused by: java.lang.NullPointerException
        at org.kravemir.gradle.sass.AbstractSassCompileTask.compile(AbstractSassCompileTask.java:63)

kgeis avatar Mar 06 '18 23:03 kgeis

Same thing with 1.2.3. I found that 1.2.3 existed through commit logs. It's not listed in the Gradle plugin registry.

kgeis avatar Mar 06 '18 23:03 kgeis

I'm seeing the same thing. My source sass was simply: body { color: red; }

bondpp7 avatar Mar 31 '18 23:03 bondpp7

@kgeis and @bondpp7 Please, paste contents of gradle.build, and result of build with stacktrace enabled (option --stacktrace). Ie. ./gradlew --stacktrace build mainSass.

kravemir avatar Apr 01 '18 16:04 kravemir

I was able to reproduce this as well in version 1.2.2 using sass files. I found using scss files to work without an issue.

adandach avatar Aug 29 '18 15:08 adandach

@adandach, please provide build.gradle and .sass files (or, example, which triggers NPE).

EDIT: or, the bare minimum is stacktrace of gradle build.

kravemir avatar Aug 29 '18 15:08 kravemir

build.gradle:

plugins {
  id 'org.kravemir.gradle.sass' version '1.2.3'
}

sass {
    main {
        srcDir = file("$projectDir/src/main/sass")
        outDir = file("$buildDir/css")
    }
}

src/main/sass/style.sass: body { color: red; }

I gave the location of the error in my inital report. I trimmed Gradle-internal stack frames as irrelevant.

kgeis avatar Aug 29 '18 17:08 kgeis

Thanks for input. Currently, amount of my free time is quite limited, and there are things with higher priority, than this.

Do any of you feel like providing a PR with fix?

kravemir avatar Sep 02 '18 15:09 kravemir

@kravemir, sorry, I switched to using Asset Pipeline and am happy with it. As far as I'm concerned, you can close this issue. It would be nice if you comment in your README that the project is barely supported and point to alternatives. I appreciate your effort in sharing your code.

kgeis avatar Sep 03 '18 05:09 kgeis

@kgeis

sorry, I switched to using Asset Pipeline and am happy with it.

Nothing to be sorry for. Just, pick what's the best, the most suitable, for your needs.

As far as I'm concerned, you can close this issue.

Nope. If there's a bug, then there's bug. Not closing stuff, that ain't fixed.

It would be nice if you comment in your README that the project is barely supported and point to alternatives.

Good point. Yea, I'll clarify support expectations in README. To not give people false impression. The plugin works for my project, and I share it just because of a good will, and that I like open-source eco-systems.

I appreciate your effort in sharing your code.

Thanks.

kravemir avatar Sep 06 '18 20:09 kravemir