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

Add singular flag to exclude all tests and test requirements #499

Open
Conan-Kudo opened this issue Jul 12, 2015 · 3 comments
Open

Add singular flag to exclude all tests and test requirements #499

Conan-Kudo opened this issue Jul 12, 2015 · 3 comments

Comments

@Conan-Kudo
Copy link
Contributor

As I've been working on #33, I've encountered an issue attempting to build it with tests excluded.

Snippet of output from the mock build:

+ gradle-local installDist --offline -x test -x testAll -x testAllButLongCrypto -x testAllLong -x testGlobal -x testScenario

FAILURE: Build failed with an exception.

* Where:
Build file '/builddir/build/BUILD/syncany-0.4.6-alpha/build.gradle' line: 29

* What went wrong:
A problem occurred evaluating root project 'syncany-0.4.6-alpha'.
> Could not resolve all dependencies for configuration 'classpath'.
   > Could not resolve net.saliman:gradle-cobertura-plugin:2.2.2.
     Required by:
         unspecified:unspecified:unspecified
      > No cached version of net.saliman:gradle-cobertura-plugin:2.2.2 available for offline mode.
   > Could not resolve org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1.
     Required by:
         unspecified:unspecified:unspecified
      > No cached version of org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1 available for offline mode.

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

BUILD FAILED

Total time: 5.23 secs

I don't really want to go through and package all the test dependencies right now, and it's okay to have packages that have tests disabled. What I'd like to have is a singular switch that disables all tests, test report generators, and all dependencies related to tests.

@binwiederhier
Copy link
Member

Something like ./gradlew -d noTests should do.
Could be implemented in build.gradle like this:

if (not noTests is set) {
   apply from: 'gradle/gradle/reports.coverage.gradle'
   apply from: 'gradle/gradle/reports.tests.gradle'
   apply from: 'gradle/gradle/reports.javadoc.gradle'
   apply from: 'gradle/gradle/reports.sonarqube.gradle'
   ...
}

@Conan-Kudo
Copy link
Contributor Author

Well, I still want Javadoc information to be generated, since that's useful for others to write things to use Syncany. I can satisfy the dependencies for the Javadoc generator.

@binwiederhier
Copy link
Member

@Conan-Kudo Any luck with this flag?

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

No branches or pull requests

2 participants