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.

common.gradle 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.1.2'
  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. configure(install.repositories.mavenInstaller) {
  24. pom.project {
  25. groupId = mavenGroupId
  26. artifactId = mavenArtifactId
  27. version = mavenVersion
  28. }
  29. }
  30. task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
  31. sourceSets*.allSource*.srcDirs*.each { File srcDir ->
  32. if (!srcDir.isDirectory()) {
  33. println "Creating source folder: ${srcDir}"
  34. srcDir.mkdirs()
  35. }
  36. }
  37. }