build.gradle 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. apply plugin: 'java'
  2. apply plugin: 'kotlin'
  3. apply plugin: 'application'
  4. mainClassName = 'ca.uwaterloo.cs858.analysis.Main'
  5. sourceCompatibility = 1.8
  6. targetCompatibility = 1.8
  7. distTar.enabled = false
  8. repositories {
  9. mavenCentral()
  10. }
  11. distributions {
  12. main {
  13. baseName = 'Customization'
  14. // include the configuration files into the distribution zip
  15. contents {
  16. into('/' + distributions.main.baseName) {
  17. from '.'
  18. include 'dat/*'
  19. exclude 'dat/Config.properties'
  20. }
  21. }
  22. }
  23. }
  24. sourceSets {
  25. main {
  26. java {
  27. srcDirs = ["src"]
  28. }
  29. resources {
  30. srcDirs = ["res"]
  31. }
  32. }
  33. }
  34. jar {
  35. baseName = 'Customization'
  36. version = '0.1'
  37. manifest {
  38. attributes 'Main-Class': 'ca.uwaterloo.cs858.analysis.Main'
  39. }
  40. }
  41. dependencies {
  42. // http://mvnrepository.com/artifact/com.google.guava/guava
  43. compile group: 'com.google.guava', name: 'guava', version: '13.0.1'
  44. // local libs
  45. compile fileTree(dir: 'libs', include: ['apktool*.jar'])
  46. compile fileTree(dir: 'libs', include: ['com.ibm.wala.*.jar'])
  47. compile fileTree(dir: 'libs', include: ['edu.purdue.cs.toydroid*.jar'])
  48. compile fileTree(dir: 'libs', include: ['dexlib*.jar'])
  49. // log libs
  50. compile "org.apache.logging.log4j:log4j-api:2.4"
  51. compile "org.apache.logging.log4j:log4j-core:2.4"
  52. // other dependencies
  53. // commons has been included in apktool
  54. // http://mvnrepository.com/artifact/commons-cli/commons-cli
  55. //compile group: 'commons-cli', name: 'commons-cli', version: '1.2'
  56. // http://mvnrepository.com/artifact/commons-io/commons-io
  57. //compile group: 'commons-io', name: 'commons-io', version: '2.2'
  58. // http://mvnrepository.com/artifact/org.slf4j/slf4j-api
  59. compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.2'
  60. // http://mvnrepository.com/artifact/ch.qos.logback/logback-classic
  61. compile group: 'ch.qos.logback', name: 'logback-core', version: '1.0.9'
  62. compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.9'
  63. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
  64. }
  65. //
  66. task copyDeps(type: Copy) {
  67. from(configurations.compile + configurations.testCompile) {
  68. include "*.jar"
  69. }
  70. into rootProject.rootDir.getAbsolutePath() + "/lib"
  71. }
  72. buildscript {
  73. ext.kotlin_version = '1.3.71'
  74. repositories {
  75. mavenCentral()
  76. }
  77. dependencies {
  78. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  79. }
  80. }
  81. compileKotlin {
  82. kotlinOptions {
  83. jvmTarget = "1.8"
  84. }
  85. }
  86. compileTestKotlin {
  87. kotlinOptions {
  88. jvmTarget = "1.8"
  89. }
  90. }