Skip to content
Snippets Groups Projects
build.gradle 3.96 KiB
Newer Older
  • Learn to ignore specific revisions
  • evaluationDependsOn(':commonbase')
    
    evaluationDependsOn(':common')
    evaluationDependsOn(':openbis_api')
    evaluationDependsOn(':openbis-common')
    evaluationDependsOn(':authentication')
    evaluationDependsOn(':dbmigration')
    evaluationDependsOn(':openbis')
    evaluationDependsOn(':datastore_server')
    evaluationDependsOn(':ui-test')
    evaluationDependsOn(':screening')
    
    
    
    felmer's avatar
    felmer committed
    apply from: '../gradle/javaproject.gradle'
    
    
    sourceSets { 
        main {
            java {
                srcDirs = ['sourceTest/java']
            }
        }
        test {
            java {
                srcDirs = ['source/java']
            }
            resources {
                srcDirs = ['servers/common/openBIS-server/etc', 'servers/common/openBIS-server/resource']
            }
        }
    }
    
    configurations.create('testRuntimeFirst')
    
    configurations.create('testRuntimeSecond')
    
    configurations.create('externalDss')
    
    dependencies {
    
        api 'reflections:reflections:0.9.10',
    
        'testng:testng:6.8-CISD',
    
    	'fasterxml:jackson-core:2.9.10',
    	'fasterxml:jackson-annotations:2.9.10',
    
    	'fasterxml:jackson-databind:2.9.10.8'
    
        testImplementation project(path: ':commonbase', configuration: 'tests'),
                           project(path: ':common', configuration: 'tests'),
                           project(path: ':dbmigration', configuration: 'tests'),
                           project(path: ':authentication', configuration: 'tests'),
                           project(path: ':openbis_api', configuration: 'tests'),
                           project(path: ':openbis-common', configuration: 'tests'),
                           project(path: ':datastore_server', configuration: 'tests'),
                           project(path: ':ui-test', configuration: 'tests'),
                           'fjelmer:classycle:1.4.2',
                           'testng:testng:6.8-CISD',
                            'selenium:selenium-java:3.141.59'
        testImplementation (project(path: ':openbis', configuration: 'tests')) {
            exclude group: 'google', module: 'gwt-user'
        }
    
    	testRuntimeFirst 'javax:servlet-api:3.1.0', 'reflections:reflections:0.9.10', 'apache:commons-lang3:3.11'
    
    	testRuntimeSecond 'google:gwt-user:2.4'
    
    	externalDss project(':screening')
    
    sourceSets.test.runtimeClasspath = configurations.testRuntimeFirst + configurations.testRuntimeSecond + sourceSets.test.runtimeClasspath
    
    
    task copyWar(type: Copy, dependsOn: project(':openbis_standard_technologies').war) {
    	from project(':openbis_standard_technologies').war
    	into 'targets/gradle/openbis-war'
    	rename {filename -> 'openbis.war'}
    }
    
    
    task deleteXlsImportVersionInfoJson {
        doFirst {
            println "DELETE xls-import-version-info.json file in $buildDir"
            File file = file('xls-import-version-info.json')
            file.delete();
        }
    }
    
    clean.dependsOn deleteXlsImportVersionInfoJson
    
    
    mpukhliak's avatar
    mpukhliak committed
    
    import org.gradle.internal.os.OperatingSystem
    
    
    test {
        useTestNG()
    
        options.suites('source/java/tests.xml')
    
        jvmArgs '-Xmx2048m', '-XX:MaxPermSize=256m', '-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StrErrLog', '-Duser.timezone=Europe/Zurich', '-Xdebug', '-Xrunjdwp:transport=dt_socket,address=20010,server=y,suspend=n'
    
        
        testLogging.showStandardStreams = true
    
    felmer's avatar
    felmer committed
        ignoreFailures = false
    
        systemProperty 'selenium.dss-runtime-classpath', configurations.externalDss.asPath
    
        systemProperty 'jetty.home', '../../../targets/gradle'
    
        systemProperty 'jetty.base', '../../../targets/gradle'
    
        systemProperty 'ui-test.start-page', 'http://localhost:20000/openbis'
        systemProperty 'org.mortbay.util.FileResource.checkAliases', 'false'
    
    felmer's avatar
    felmer committed
        systemProperty 'org.eclipse.jetty.util.log.class', 'org.eclipse.jetty.util.log.StrErrLog'
    
        
        workingDir = 'servers/common/openBIS-server'
    
    mpukhliak's avatar
    mpukhliak committed
    
        if (OperatingSystem.current().isLinux()) {
            systemProperty 'webdriver.gecko.driver', 'gecko-driver/linux/geckodriver'
        } else if (OperatingSystem.current().isMacOsX()) {
            systemProperty 'webdriver.gecko.driver', 'gecko-driver/mac/geckodriver'
        } else {
            println "Please set up geckodriver"
        }
    
    test.dependsOn copyWar