1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // This file is to be applied to every subproject.
- //
-
- apply plugin: 'java'
- apply plugin: 'maven'
-
- String mavenGroupId = 'org.openzen.zencode'
- String mavenVersion = '0.1.2'
-
- sourceCompatibility = '1.8'
- [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
-
- repositories {
- mavenCentral();
- }
-
- dependencies {
- compile 'net.sf.trove4j:trove4j:3.0.3'
- }
-
- String mavenArtifactId = name
-
- group = mavenGroupId
- version = mavenVersion
-
- task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
- classifier = 'sources'
- from sourceSets.main.allSource
- }
-
- configure(install.repositories.mavenInstaller) {
- pom.project {
- groupId = mavenGroupId
- artifactId = mavenArtifactId
- version = mavenVersion
- }
- }
-
- task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
- sourceSets*.allSource*.srcDirs*.each { File srcDir ->
- if (!srcDir.isDirectory()) {
- println "Creating source folder: ${srcDir}"
- srcDir.mkdirs()
- }
- }
- }
|