From 43b51821ff8d03aa55209c66ea3e26080cf3cb8c Mon Sep 17 00:00:00 2001 From: Alex Clayton Date: Fri, 17 Jul 2015 14:27:26 +0100 Subject: Get make and make test to rebuild all dependent classes When 'make' and 'make test' (or 'ant' and 'ant test') were run only the .java files that were directly modifed were compiled. This could cause problems if you changed a method signature (such as changing Request.send()'s return type from void to String). Classes that called that method would not be updated, and have out of date refences to the old method signature, leading to NoSuchMethodError. This patch modifies the build.xml to add depend tasks to the compile and compile-test targets. These run before the javac task is run and delete all classes files who's corresponding java file has been modified or are a class that depends on one of these modified classes. As the class files have now been deleted javac will then compile them giving us the result we want. In the compile-test case all classes are deleted if stroke.jar has been modified. FogBugz: Bug: Release-notes: Manual: Test-information: After applying patch I modified Request.send()'s return type to String and then ran 'make' and 'make test'. All the classes that depend on request were rebuilt and all the tests passed correctly (previously we would get tests failing due to NoSuchMethodError). I then change Request.send() back and ran 'make test' only, in this case it automatically rebuild all the java classes affected by the change and then ran the tests which all passed. Change-Id: I330e7a48b1fc8065091b42068adc6e6624eb2e00 Reviewer: diff --git a/build.xml b/build.xml index c56aaa8..18f72cc 100644 --- a/build.xml +++ b/build.xml @@ -49,6 +49,10 @@ + + +