ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // This file is to be applied to every subproject.
  3. //
  4. apply plugin: 'java'
  5. apply plugin: 'maven'
  6. String mavenGroupId = 'org.openzen.zencode'
  7. String mavenVersion = '0.3.8'
  8. sourceCompatibility = '1.8'
  9. [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
  10. repositories {
  11. mavenCentral();
  12. }
  13. dependencies {
  14. compile 'net.sf.trove4j:trove4j:3.0.3'
  15. }
  16. String mavenArtifactId = name
  17. group = mavenGroupId
  18. version = mavenVersion
  19. task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
  20. classifier = 'sources'
  21. from sourceSets.main.allSource
  22. }
  23. artifacts {
  24. archives sourcesJar
  25. }
  26. configure(install.repositories.mavenInstaller) {
  27. pom.project {
  28. groupId = mavenGroupId
  29. artifactId = mavenArtifactId
  30. version = mavenVersion
  31. }
  32. }
  33. task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
  34. sourceSets*.allSource*.srcDirs*.each { File srcDir ->
  35. if (!srcDir.isDirectory()) {
  36. println "Creating source folder: ${srcDir}"
  37. srcDir.mkdirs()
  38. }
  39. }
  40. }