Select Git revision
build.gradle
-
Jens Bendisposto authoredJens Bendisposto authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
build.gradle 3.38 KiB
project.version = '1.0.3-SNAPSHOT';
project.group = 'de.hhu.stups'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'application'
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
configurations {
sablecc
}
configurations {
kodkod
}
sourceSets {
main {
java {
srcDirs = ['build/temp','src/main/java']
}
}
}
sourceSets.main.compileClasspath += configurations.kodkod
sourceSets.test.runtimeClasspath += files(sourceSets.main.java.srcDirs)
dependencies {
sablecc 'de.hhu.stups:sablecc:3.2.10'
compile 'de.hhu.stups:prologlib:2.4.40'
kodkod name: 'kodkod'
compile 'org.ow2.sat4j:org.ow2.sat4j.core:2.3.5'
testCompile 'junit:junit:4.8.2'
}
task genParser(type:JavaExec) {
doFirst{ file('build/temp').mkdirs() }
inputs.dir new File('src/main/resources')
outputs.dir new File('build/temp')
main = 'org.sablecc.sablecc.SableCC'
classpath = configurations.sablecc
maxHeapSize = '1024m'
args = ['-d','build/temp','src/main/resources/problem.grammar']
}
compileJava {
dependsOn = ['genParser']
}
test {
doFirst {
println "testing"
}
}
mainClassName = 'de.stups.probkodkod.KodkodInteraction'
javadoc {
failOnError= false
}
jar {
manifest {
attributes 'Main-Class': mainClassName,
'Implementation-Title': 'ProB Kodkod',
'Implementation-Version': project.version
}
include '**/*.class'
include '**/*.java'
exclude '**.*.scc'
from 'build/temp'
include '**/*.dat'
include '**/*.properties'
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
from configurations.kodkod.collect { it.isDirectory() ? it : zipTree(it) }
}
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
apply plugin: 'signing'
signing {
sign configurations.archives
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'ProB Kodkod'
packaging 'jar'
// optionally artifactId can be defined here
description "Wrapper to use Kodkod in ProB."
url 'https://github.com/hhu-stups/probkodkod'
licenses {
license {
name 'MIT License'
url 'http://research.microsoft.com/en-us/um/people/lamport/tla/license.html'
}
}
scm {
connection 'scm:git:git://github.com/hhu-stups/probkodkod.git'
developerConnection 'scm:git:git@github.com:hhu-stups/probkodkod.git'
url 'https://github.com/hhu-stups/probkodkod'
}
developers {
developer {
id 'bendisposto'
name 'Jens Bendisposto'
email 'jens@bendisposto.de'
}
}
}
}
}
}
}