Skip to content
Snippets Groups Projects
build.gradle 5.73 KiB
Newer Older
  • Learn to ignore specific revisions
  • evaluationDependsOn(':api-openbis-java')
    
    evaluationDependsOn(':api-openbis-javascript')
    
    evaluationDependsOn(':lib-openbis-common')
    
    evaluationDependsOn(':lib-authentication')
    
    evaluationDependsOn(':lib-dbmigration')
    
    apply from: '../build/javaproject.gradle'
    
    configurations.create('testRuntimeFirst')
    
    configurations.create('devRuntime')
    
                project(':api-openbis-java'),
    
                project(':lib-openbis-common'),
    
                project(':lib-authentication'),
    
                project(':lib-dbmigration'),
    
                'hibernate:hibernate-core:5.2.14.Final',
                'fasterxml:classmate:1.3.0',
                'eclipse:jetty-deploy:9.4.44.v20210927',
                'google:gwt-debug-panel:1.0',
                'javax:servlet-api:3.1.0',
                'google:gwt-user:2.4',
                'reveregroup:gwt-image-loader:1.1.4',
                'springframework:spring-orm:5.0.17.RELEASE',
                'cisd:cisd-hotdeploy:13.01.0',
                'apache:poi-ooxml:3.17',
                'hibernate:hibernate-validator:4.3.2.Final',
                'unimi:fastutil:5.1.5',
                'apache:commons-collections4:4.1',
                'springframework:spring-context-support:5.0.17.RELEASE',
                'ehcache:ehcache:2.10.0',
                'jline:jline:0.9.94'
    
    
        runtimeOnly 'slf4j:slf4j-log4j12:1.6.2',
                'apache:commons-fileupload:1.3.3'
    
        devRuntime 'eclipse:jetty-runner:9.4.44.v20210927'
    
        testImplementation project(path: ':lib-commonbase', configuration: 'tests'),
    
                project(path: ':lib-common', configuration: 'tests'),
    
                project(path: ':lib-dbmigration', configuration: 'tests'),
    
                project(path: ':lib-authentication', configuration: 'tests'),
    
                project(path: ':api-openbis-java', configuration: 'tests'),
    
                project(path: ':lib-openbis-common', configuration: 'tests'),
    
                'fjelmer:classycle:1.4.2',
                'testng:testng:6.8-CISD',
                'springframework:spring-test:5.0.17.RELEASE',
                'apache:commons-fileupload:1.3.3',
                'startnet:apgdiff:2.3'
    
        testRuntimeFirst 'javax:servlet-api:3.1.0'
    
    sourceSets.test.runtimeClasspath = configurations.testRuntimeFirst + sourceSets.test.runtimeClasspath
    
        testRuntime.exclude group: 'google', module: 'gwt-servlet'
    
        main {
            resources {
                srcDirs = ['source/java']
            }
        }
        test {
            resources {
                srcDirs = ['sourceTest/java']
            }
        }
    
    task cleanDbSuite(type: Test) {
    
        useTestNG()
        systemProperty "ant.project.name", project.name
        maxHeapSize = "4096m"
    
        jvmArgs '-Duser.timezone=Europe/Zurich'
    
        testLogging.showStandardStreams = true
        ignoreFailures = true
    
        options.suites('sourceTest/java/tests_system_cleandb_excluding_authorization.xml')
        reports.html.destination = file("${project.buildDir}/reports/tests-cleandb")
    
    task cleanDbSuiteProjectSamplesEnabled(type: Test) {
    
        useTestNG()
        systemProperty "ant.project.name", project.name
        maxHeapSize = "4096m"
    
        jvmArgs '-Duser.timezone=Europe/Zurich'
    
        testLogging.showStandardStreams = true
        ignoreFailures = true
        systemProperty "project-samples-enabled", 'true'
    
        options.suites('sourceTest/java/tests_system_cleandb_excluding_authorization_project_samples.xml')
        reports.html.destination = file("${project.buildDir}/reports/tests-cleandb-project-samples")
    
    }
    
    task testProjectSamplesEnabled(type: Test) {
    
        useTestNG()
        systemProperty "ant.project.name", project.name
        maxHeapSize = "4096m"
    
        jvmArgs '-Duser.timezone=Europe/Zurich'
    
        testLogging.showStandardStreams = true
        ignoreFailures = true
        systemProperty "project-samples-enabled", 'true'
    
        options.suites('sourceTest/java/tests_project_samples.xml')
        reports.html.destination = file("${project.buildDir}/reports/tests-project-samples")
    
    // This task is here to make WebAppsPropertiesTest to work. It requires some data files
    // to be present on the same directory than the class file itself.
    task copyTestData(type: Copy, dependsOn: testClasses) {
    
        from "${project.projectDir}/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/basic"
        into "${project.buildDir}/classes/test/ch/systemsx/cisd/openbis/generic/shared/basic"
        include "*.properties"
    
    task openBISDevelopmentEnvironmentASStart(type: JavaExec) {
    
        main = 'org.eclipse.jetty.runner.Runner'
        classpath = sourceSets.main.runtimeClasspath + configurations.devRuntime
        jvmArgs(['-Dpython.path=../libraries/jython/jython-lib', '-Dlog4j.configuration=etc/log.xml',
                 '-Djavax.net.ssl.trustStore=dist/server/openBIS.keystore',
                 '-Dorg.mortbay.util.FileResource.checkAliases=false',
                 '--add-opens=java.base/java.util=ALL-UNNAMED', '--add-opens=java.base/java.lang=ALL-UNNAMED',
                 '-Xmx2048M', '-ea'])
    
        args(['--classes', '../lib-commonbase/targets/gradle/classes/java/main',
    
              '--classes', '../lib-common/targets/gradle/classes/java/main',
    
              '--classes', '../lib-authentication/targets/gradle/classes/java/main',
    
              '--classes', '../lib-dbmigration/targets/gradle/classes/java/main',
    
              '--classes', '../lib-openbis-common/targets/gradle/classes/java/main',
    
              '--classes', '../api-openbis-java/targets/gradle/classes/java/main',
    
              '--classes', 'targets/gradle/classes/java/main', '--lib', 'targets/www/lib/', '--port', '8888', 'targets/www'])
    
    testProjectSamplesEnabled.dependsOn(copyTestData)
    
    cleanDbSuiteProjectSamplesEnabled.dependsOn(testProjectSamplesEnabled)
    
    juanf's avatar
    juanf committed
    test.maxHeapSize = "10240m"
    
    apply from: 'gwtdev.gradle'