Changeset 4512a94


Ignore:
Timestamp:
Dec 9, 2017 1:43:09 AM (2 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
7dae4eb
Parents:
a67ea4b
Message:

Gradle: Run ScalaTest? tests in addition to the JUnit tests

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/build.gradle

    ra67ea4b r4512a94  
    11apply plugin: 'war'
     2apply plugin: 'scala'
    23
    34sourceSets {
     
    56        java {
    67            srcDir 'java/src'
     8        }
     9    }
     10    test {
     11        scala {
     12            srcDir 'java/test/scalatest'
    713        }
    814    }
     
    1723    providedCompile project(':apps:jetty')
    1824    providedCompile project(':apps:jrobin')
     25
     26    testCompile "org.scala-lang:scala-library:2.12.4"
     27    testCompile 'org.scalatest:scalatest_2.12:3.0.4'
    1928}
     29
     30task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
     31    main = 'org.scalatest.tools.Runner'
     32    args = ['-R', 'build/classes/scala/test', '-o']
     33    classpath = sourceSets.test.runtimeClasspath
     34}
     35test.dependsOn scalaTest
    2036
    2137jar {
  • build.gradle

    ra67ea4b r4512a94  
     1apply plugin: 'idea'
     2
    13// Exclude apps/ dir itself, but include its subdirs
    24def javaProjects = subprojects - project(':apps')
  • core/build.gradle

    ra67ea4b r4512a94  
    11apply plugin: 'java-library'
     2apply plugin: 'scala'
    23
    34archivesBaseName = 'i2p'
     
    3132            include 'net/i2p/crypto/eddsa/math/basePrecmp'
    3233        }
     34        scala {
     35            srcDir 'java/test/scalatest'
     36        }
    3337    }
    3438}
     
    3741    implementation 'gnu.getopt:java-getopt:1.0.13'
    3842    implementation 'org.gnu.gettext:libintl:0.18.3'
     43
     44    testCompile "org.scala-lang:scala-library:2.12.4"
     45    testCompile 'org.scalatest:scalatest_2.12:3.0.4'
    3946}
     47
     48task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
     49    main = 'org.scalatest.tools.Runner'
     50    args = ['-R', 'build/classes/scala/test', '-o']
     51    classpath = sourceSets.test.runtimeClasspath
     52}
     53test.dependsOn scalaTest
    4054
    4155configurations {
Note: See TracChangeset for help on using the changeset viewer.