liferay / liferay-module-config-generator

GNU Lesser General Public License v3.0
4 stars 8 forks source link

Non-idempotent over already analyzed sources #24

Closed yuchi closed 8 years ago

yuchi commented 8 years ago

In a Liferay Module with a package.json if you launch gradle build twice, without passing through a clean task, it will revert back to nameless defines.

This could be a problem with how tasks are run in Liferay.

/cc @Ithildir @jbalsas


For future reference you can solve this by forcing clean before build and deploy:

// build.gradle

build.mustRunAfter clean
build.dependsOn clean

deploy.mustRunAfter clean
deploy.dependsOn clean
jbalsas commented 8 years ago

Hey @yuchi, I think we already fixed this... which version are you running? Could you verify if https://issues.liferay.com/browse/LPS-68485 fixed this for you?

yuchi commented 8 years ago

Looks in fact the same issue. But it’s fixed in com.liferay.gradle.plugins.workspace version 1.1.1 and the last public available version is 1.1.0 (which is the one we’re using now).

See: http://search.maven.org/#search|ga|1|com.liferay.gradle.plugins.workspace

jbalsas commented 8 years ago

Right... @ithildir should know more then

yuchi commented 8 years ago

In the worst case scenario I’ll make him fix by hand by patching the binaries in my workspace when @Ithildir will be in Milan :P

Ithildir commented 8 years ago

@yuchi, until we publish a new com.liferay.gradle.plugins.workspace, you can override the transitive dependency to com.liferay.gradle.plugins in your settings.gradle and use a more recent one:

dependencies {
        classpath group: "com.liferay", name: "com.liferay.gradle.plugins", version: "2.0.48"
        classpath group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "1.1.0"
    }
yuchi commented 8 years ago

@Ithildir I’m not that skilled on dependency management on Gradle. Does that setup override the one automatically included my com.liferay.gradle.plugins.workspace?

Ithildir commented 8 years ago

Yes, we're creating a resolution conflict with those 2 dependencies: Workspace wants to use 2.0.45, but you're telling Gradle you want 2.0.48 instead. And, by default, the newer version wins.

yuchi commented 8 years ago

Works flawlessly. Thanks for your clarity, as always.