Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Switch junit from compile to testCompile #172

Closed
yanokwa opened this issue Aug 15, 2017 · 1 comment
Closed

Switch junit from compile to testCompile #172

yanokwa opened this issue Aug 15, 2017 · 1 comment

Comments

@yanokwa
Copy link
Member

yanokwa commented Aug 15, 2017

https://github.com/opendatakit/briefcase/blob/master/build.gradle#L36 notes that instead of compile, the command should be testCompile, and yet if testCompile is used, it fails as shown below.

This is not desirable because we care about binary size and we don't want to bundle junit as part of the jar if we don't have to.

:generateBuildConfig UP-TO-DATE
:compileBuildConfig UP-TO-DATE
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/Users/yanokwa/odk-briefcase/src/test/java/org/opendatakit/briefcase/model/BriefcaseAnalyticsTest.java:3: error: package org.junit does not exist
import org.junit.Test;
                ^
/Users/yanokwa/odk-briefcase/src/test/java/org/opendatakit/briefcase/model/BriefcaseAnalyticsTest.java:5: error: package org.junit does not exist
import static org.junit.Assert.assertNotNull;
                       ^
/Users/yanokwa/odk-briefcase/src/test/java/org/opendatakit/briefcase/model/BriefcaseAnalyticsTest.java:5: error: static import only from classes and interfaces
import static org.junit.Assert.assertNotNull;
^
/Users/yanokwa/odk-briefcase/src/test/java/org/opendatakit/briefcase/model/BriefcaseAnalyticsTest.java:8: error: cannot find symbol
    @Test
     ^
  symbol:   class Test
  location: class BriefcaseAnalyticsTest
/Users/yanokwa/odk-briefcase/src/test/java/org/opendatakit/briefcase/model/BriefcaseAnalyticsTest.java:11: error: cannot find symbol
        assertNotNull(ba);
        ^
  symbol:   method assertNotNull(BriefcaseAnalytics)
  location: class BriefcaseAnalyticsTest
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors
1 warning
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
@yanokwa
Copy link
Member Author

yanokwa commented Sep 12, 2017

@opendatakit-bot claim

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant