build.gradle 2.25 KB
Newer Older
Fabian Becker's avatar
Fabian Becker committed
1 2
apply plugin: 'java'
apply plugin: 'maven'
Fabian Becker's avatar
Fabian Becker committed
3
apply plugin: 'com.bmuschko.nexus'
Fabian Becker's avatar
Fabian Becker committed
4

Fabian Becker's avatar
Fabian Becker committed
5
group = 'de.openea'
Fabian Becker's avatar
Fabian Becker committed
6 7
version = '2.2.0'

Fabian Becker's avatar
Fabian Becker committed
8
description = "EvA2"
Fabian Becker's avatar
Fabian Becker committed
9

Fabian Becker's avatar
Fabian Becker committed
10 11
sourceCompatibility = 1.10
targetCompatibility = 1.10
Fabian Becker's avatar
Fabian Becker committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28


//create a single Jar with all dependencies
task fatJar(type: Jar) {
	manifest {
        attributes 'Implementation-Title': 'Gradle Jar File Example',  
        	'Implementation-Version': version,
        	'Main-Class': 'eva2.gui.Main'
    }
    baseName = project.name + '-all'
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    with jar
}

repositories {
    mavenCentral()        
}
Fabian Becker's avatar
Fabian Becker committed
29

Fabian Becker's avatar
Fabian Becker committed
30
dependencies {
31
    compile group: 'javax.help', name: 'javahelp', version: '2.0.05'
Fabian Becker's avatar
Fabian Becker committed
32
    compile group: 'org.yaml', name: 'snakeyaml', version: '1.18'
33
    compile group: 'gov.nist.math', name: 'jama', version: '1.0.3'
Fabian Becker's avatar
Fabian Becker committed
34
    testCompile group: 'junit', name: 'junit', version: '4.12'
Fabian Becker's avatar
Fabian Becker committed
35
    testCompile group: 'org.mockito', name: 'mockito-core', version: '2.16.0'
Fabian Becker's avatar
Fabian Becker committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
}

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
    }
}

modifyPom {
    project {
        name 'EvA2'
        description 'Gradle plugin that provides tasks for configuring and uploading artifacts to Sonatype Nexus.'
        url 'http://www.ra.cs.uni-tuebingen.de/software/eva2/'
        inceptionYear '2008'

        scm {
            url 'https://gitlab.cs.uni-tuebingen.de/eva2/eva2/'
            connection 'scm:https://gitlab.cs.uni-tuebingen.de/eva2/eva2/.git'
            developerConnection 'scm:https://gitlab.cs.uni-tuebingen.de/eva2/eva2/.git'
        }

        licenses {
            license {
                name 'GNU Lesser General Public License, Version 3.0'
                url 'http://www.gnu.org/licenses/lgpl-3.0.html'
                distribution 'repo'
            }
        }

        developers {
            developer {
                id 'halfdan'
                name 'Fabian Becker'
                email 'halfdan@xnorfz.de'
            }
        }
    }
}

extraArchive {
    sources = true
    tests = true
    javadoc = true
}

nexus {
    repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
    snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
Fabian Becker's avatar
Fabian Becker committed
87
}