Skip to content
Snippets Groups Projects
Select Git revision
  • d6689d3ad6b770fb9ab6062eeb21b661008722d7
  • master default protected
  • 3.8.0
  • 3.7.0
  • 3.6.0
  • 3.5.0
  • 3.4.0
  • 3.3.0
  • 3.2.1
  • 3.2.0
10 results

build.gradle

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    build.gradle 2.17 KiB
    plugins {
    	id "eclipse"
    	id "java-library"
    	id "maven-publish"
    	id "signing"
    }
    
    project.version = '3.2.1-SNAPSHOT'
    project.group = 'de.hhu.stups'
    final isSnapshot = project.version.endsWith("-SNAPSHOT")
    
    sourceSets {
    	main {
    		java {
    			srcDir 'src'
    		}
    	}
    }
    
    ant.properties["org.eventb.core.ast.home"] = projectDir.toString()
    ant.importBuild 'tom/tom-task.xml'
    
    task tom() {
    	doLast {
    		ant.tom(
    			config: 'tools/tom-2.8/Tom.xml',
    			classpath: ant.references['tom.classpath'],
    			srcdir: 'src',
    			destdir: 'src',
    			options: "-I ${projectDir}/tom",
    			pretty: 'true',
    			optimize: 'true',
    		) {
    			include(name: '**/*.t')
    		}
    	}
    }
    
    java {
    	sourceCompatibility = JavaVersion.VERSION_1_7
    
    	withSourcesJar()
    	withJavadocJar()
    }
    
    compileJava {
    	dependsOn << 'tom'
    }
    
    javadoc {
    	failOnError = false
    }
    
    clean {
    	delete "src/org/eventb/internal/core/typecheck/TypeUnifier.java"
    }
    
    publishing {
    	publications {
    		mavenJava(MavenPublication) {
    			from components.java
    
    			pom {
    				name = "Rodin EventB AST"
    				description = "The AST library extracted from the Rodin Platform."
    				url = "https://github.com/hhu-stups/rodin-ast"
    
    				licenses {
    					license {
    						name = "Eclipse Public License, V 1.0"
    						url = "https://www.eclipse.org/legal/epl-v10.html"
    					}
    				}
    
    				scm {
    					connection = "scm:git:git://github.com/hhu-stups/rodin-ast.git"
    					developerConnection = "scm:git:git@github.com:hhu-stups/rodin-ast.git"
    					url = "https://github.com/hhu-stups/rodin-ast"
    				}
    
    				developers {
    					developer {
    						id = "bendisposto"
    						name = "Jens Bendisposto"
    						email = "jens@bendisposto.de"
    					}
    				}
    			}
    		}
    	}
    
    	repositories {
    		maven {
    			final releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
    			final snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
    			url isSnapshot ? snapshotsRepoUrl : releasesRepoUrl
    			if (project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")) {
    				credentials {
    					username project.ossrhUsername
    					password project.ossrhPassword
    				}
    			}
    		}
    	}
    }
    
    ext."signing.secretKeyRingFile" = rootProject.file("secring.gpg").absolutePath
    
    signing {
    	sign publishing.publications.mavenJava
    }