File: generateClasspath.gradle

package info (click to toggle)
android-platform-tools-base 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 123,960 kB
  • ctags: 236,781
  • sloc: java: 826,450; xml: 45,920; cpp: 2,526; ansic: 1,432; sh: 537; lisp: 110; makefile: 21
file content (21 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
task generateClasspath(overwrite: true) {
  def classpathFilePath = "${buildDir}/${project.name}.classpath"
  outputs.files classpathFilePath
  assemble.dependsOn generateClasspath
  doFirst {
    mkdir buildDir
    def classpathFile = file(classpathFilePath)
    classpathFile.createNewFile()
    classpathFile.write(
      configurations.runtime.collect {
        if (it.path.startsWith('/usr/share/')) {
          it.path
        } else {
          "/usr/share/java/${it.name}"
        }
      }.toSorted().join(':')
    )
  }
  clean.doLast { delete classpathFilePath }
}