Build comparison for multi-project build


(Benjamin Muschko) #1

Hi,

I was trying out the build comparison plugin for a multi-project build to check an upgrade from Gradle 1.5 to 1.6-rc-1. The project structure looks as follows:

root project |— projectA (JAR) |— projectB (JAR) \— projectC (WAR)

Project B has a compile dependency on the project A, project C has a compile dependency on project A and B.

This is how I apply and configure the build comparison plugin:

apply plugin: 'compare-gradle-builds'
  task wrapper(type: Wrapper) {
    gradleVersion = '1.5'
}
  compareGradleBuilds {
      sourceBuild {
          projectDir = rootProject.projectDir
        gradleVersion = '1.5'
    }
      targetBuild {
          projectDir = sourceBuild.projectDir
          gradleVersion = '1.6-rc-1'
    }
  }

The result of the build reports that there are different outcomes between source and target build:

:projectA:jar The archives are completely identical.

:projectB:jar The archives are completely identical.

:projectC:war There are differences within the archive.

WEB-INF/lib/projectA-0.1.jar entries are of identical size but have different content WEB-INF/lib/projectB-0.1.jar entries are of identical size but have different content

So far I haven’t found out what the difference is. Wouldn’t it be correct to assume that if the outcome of project A and project B is identical then this shouldn’t be an issue for project C? Can someone explain this behavior?

Thanks,

Ben


(Peter Niederwieser) #2

Have you tried to manually unpack the Wars and do a file compare on the Jars?


(Benjamin Muschko) #3

I just ran a file compare with the tools PkgDiff and Java API Compliance Checker. Both tools report full compatibility for projectA.jar and projectB.jar extracted from the WAR file. Is there any specific file comparison tool that you want me to use?


(Peter Niederwieser) #4

I was thinking of a simple bytewise comparison.


(Benjamin Muschko) #5

Bytewise they are in fact different but I can’t seem to figure out what the difference is. Would a sample project help?