File: settings.gradle

package info (click to toggle)
bnd 5.0.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,128 kB
  • sloc: java: 249,039; xml: 90,728; sh: 655; perl: 153; makefile: 96; python: 47; javascript: 9
file content (57 lines) | stat: -rw-r--r-- 1,682 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * Master Gradle initialization script
 */

import aQute.bnd.osgi.Constants

/* Add bnd gradle plugin as a script dependency */
buildscript {
  repositories {
    mavenCentral()
    maven {
      url '/usr/share/maven-repo'
    }
  }
  dependencies {
    classpath fileTree(dir: 'bootstrap', include: ['*.jar'])
    classpath 'org.osgi:osgi.cmpn:debian'
    classpath 'org.tukaani:xz:debian'
  }
  /* Since the files in the repository change with each build, we need to recheck for changes */
  configurations.classpath {
    resolutionStrategy {
      cacheChangingModulesFor 30, 'minutes'
      cacheDynamicVersionsFor 30, 'minutes'
    }
  }
  dependencies {
    components {
      all { ComponentMetadataDetails details ->
        details.changing = true
      }
    }
  }
  /* Add bnd gradle plugin to buildscript classpath of rootProject */
  def bndPlugin = files(configurations.classpath.files)
  gradle.rootProject {
    buildscript {
      repositories { maven { url 'file:///usr/share/maven-repo' } }
      dependencies {
        classpath fileTree(dir: 'bootstrap', include: ['*.jar'])
        classpath 'org.osgi:osgi.cmpn:debian'
        classpath 'org.tukaani:xz:debian'
      }
    }
  }
}

gradle.ext.bndWorkspaceConfigure = { workspace ->
  /*
   * Compute the build time stamp. 
   * If the git workspace is clean, the build time is the time of the head commit.
   * If the git workspace is dirty, the build time is the current time.
   */
  workspace.setProperty(Constants.TSTAMP, System.getProperty("SOURCE_DATE_EPOCH") != null ? System.getProperty("SOURCE_DATE_EPOCH") : Long.toString(System.currentTimeMillis()))
}

apply plugin: 'biz.aQute.bnd.workspace'