I clean before every build, but I just moved everything but the source and it
still happens.  Does this feature work for other people?  If you have a test
class that doesn't compile and you exclude it from compile and compileTests
with gradle 0.6.1, does it skip it?  I have had success skipping tests this
way, but this is the first time I am trying not to compile a file.


Steve Appling wrote:
> 
> The tests are actually run against the class files, so it you have
> previously 
> compiled the tests before excluding it, the unwanted class file may still
> be in 
> the build directory.
> 
> Try running "gradle clean test"
> 
> JerodLass wrote:
>> I'm building a project with a test file that imports a class that I see
>> no
>> evidence actually exists.  The test file is 95% commented out so I know I
>> can safely ignore it, but it's not mine so I cannot change it.  Thus, I
>> would like to exclude it from the build (which doesn't run tests yet
>> anyway).  I added the following line to the build file:
>> 
>> compileTests.exclude(**/BadTestFile.java)
>> 
>> When I build, the number of files to compile decreases by 1, but I still
>> get
>> the error.  The file looks to be effectively excluded by gradle in the
>> debug
>> output, but the javac command that is executed still gives -sourcepath
>> /project/testsrc so it still tries to compile every test class and I get
>> an
>> error.  Basically, I am getting compile errors from a class that "isn't
>> being compiled." Am I doing something wrong or does this functionality
>> get
>> lost somewhere before making it to the compiler?
>> 
>> Thanks for any help,
>> Jerod
> 
> -- 
> Steve Appling
> Automated Logic Research Team
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Excluding-a-Test-Source-File-tp24398537p24399511.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to