Skip to content

Instantly share code, notes, and snippets.

@AbrarSyed
Last active January 18, 2018 00:36
Show Gist options
  • Select an option

  • Save AbrarSyed/9440192 to your computer and use it in GitHub Desktop.

Select an option

Save AbrarSyed/9440192 to your computer and use it in GitHub Desktop.

Revisions

  1. AbrarSyed revised this gist Jan 18, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -9,14 +9,14 @@ allprojects {

    // convert map to classpaths
    versions = versions.collectEntries { key, value ->
    [key, fileTree(dir: value, include: "*.jar").getAsPath()]
    [key, fileTree(dir: value, include: "*.jar")]
    }

    def apply = { task ->
    if (versions.containsKey(task.targetCompatibility))
    {
    task.options.fork = true;
    task.options.bootClasspath = versions[task.targetCompatibility]
    task.options.bootstrapClasspath = versions[task.targetCompatibility]
    }
    }
    tasks.withType(JavaCompile, apply)
  2. AbrarSyed revised this gist Oct 16, 2015. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,9 @@ allprojects {
    ]

    // convert map to classpaths
    versions = versions.collectEntries { key, value -> [key, fileTree(dir: value, include: "*.jar").getAsPath()] }
    versions = versions.collectEntries { key, value ->
    [key, fileTree(dir: value, include: "*.jar").getAsPath()]
    }

    def apply = { task ->
    if (versions.containsKey(task.targetCompatibility))
  3. AbrarSyed revised this gist Oct 16, 2015. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,7 @@ allprojects {
    ]

    // convert map to classpaths
    versions = versions.collectEntries { key, value ->
    return [key, fileTree(dir: value, include: "*.jar").getAsPath()]
    }
    versions = versions.collectEntries { key, value -> [key, fileTree(dir: value, include: "*.jar").getAsPath()] }

    def apply = { task ->
    if (versions.containsKey(task.targetCompatibility))
  4. AbrarSyed revised this gist May 20, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,9 @@ allprojects {
    afterEvaluate {
    def versions = [
    '1.6' : "/usr/lib/jvm/java-6-jdk/jre/lib/",
    '1.7' : "/usr/lib/jvm/java-7-jdk/jre/lib/",
    '1.7' : "/usr/lib/jvm/java-7-openjdk/jre/lib/",
    //'1.7' : "C:/Program Files/java/jre7/lib", // windows example (I think)
    '1.8' : "/usr/lib/jvm/java-8-jdk/jre/lib/"
    '1.8' : "/usr/lib/jvm/java-8-openjdk/jre/lib/"
    ]

    // convert map to classpaths
  5. AbrarSyed revised this gist May 19, 2015. 1 changed file with 6 additions and 8 deletions.
    14 changes: 6 additions & 8 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,15 @@
    allprojects {
    afterEvaluate {
    def versions = [
    '1.6' : "/opt/java6/jre/lib/"
    '1.7' : "/usr/lib/jvm/java-7-openjdk/jre/lib" // linux example, well arch linux atleast
    '1.7' : "C:/Program Files/java/jre7/lib" // windows example (I think)
    '1.6' : "/usr/lib/jvm/java-6-jdk/jre/lib/",
    '1.7' : "/usr/lib/jvm/java-7-jdk/jre/lib/",
    //'1.7' : "C:/Program Files/java/jre7/lib", // windows example (I think)
    '1.8' : "/usr/lib/jvm/java-8-jdk/jre/lib/"
    ]

    // convert map to classpaths
    versions = versions.collectEntries { key, value ->
    def path = new File(value)
    value = path.listFiles().findAll { it.getPath().endsWith(".jar") }
    value = value.join(File.pathSeparator)
    return [key, value]
    return [key, fileTree(dir: value, include: "*.jar").getAsPath()]
    }

    def apply = { task ->
    @@ -23,4 +21,4 @@ allprojects {
    }
    tasks.withType(JavaCompile, apply)
    }
    }
    }
  6. AbrarSyed revised this gist Mar 18, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ allprojects {
    afterEvaluate {
    def versions = [
    '1.6' : "/opt/java6/jre/lib/"
    '1.7' : "/usr/lib/jvm/java-7-openjdk/jew/lib" // linux example, well arch linux atleast
    '1.7' : "/usr/lib/jvm/java-7-openjdk/jre/lib" // linux example, well arch linux atleast
    '1.7' : "C:/Program Files/java/jre7/lib" // windows example (I think)
    ]

  7. AbrarSyed revised this gist Feb 7, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ allprojects {
    def versions = [
    '1.6' : "/opt/java6/jre/lib/"
    '1.7' : "/usr/lib/jvm/java-7-openjdk/jew/lib" // linux example, well arch linux atleast
    '1.7' : "C:/Program Files/java/jre/lib" // windows example (I think)
    '1.7' : "C:/Program Files/java/jre7/lib" // windows example (I think)
    ]

    // convert map to classpaths
  8. AbrarSyed revised this gist Feb 7, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@ allprojects {
    afterEvaluate {
    def versions = [
    '1.6' : "/opt/java6/jre/lib/"
    '1.7' : "/usr/lib/jvm/java-7-openjdk/jew/lib" // linux example, well arch linux atleast
    '1.7' : "C:/Program Files/java/jre/lib" // windows example (I think)
    ]

    // convert map to classpaths
  9. AbrarSyed revised this gist Jul 6, 2014. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,6 @@ allprojects {
    task.options.bootClasspath = versions[task.targetCompatibility]
    }
    }
    tasks.withType(Compile, apply)
    tasks.withType(JavaCompile, apply)
    }
    }
  10. AbrarSyed revised this gist May 23, 2014. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -12,8 +12,6 @@ allprojects {
    return [key, value]
    }

    println versions

    def apply = { task ->
    if (versions.containsKey(task.targetCompatibility))
    {
  11. AbrarSyed revised this gist May 23, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -5,13 +5,15 @@ allprojects {
    ]

    // convert map to classpaths
    versions.collectEntries { key, value ->
    versions = versions.collectEntries { key, value ->
    def path = new File(value)
    value = path.listFiles().findAll { it.getPath().endsWith(".jar") }
    value = value.join(File.pathSeparator)
    return [key, value]
    }

    println versions

    def apply = { task ->
    if (versions.containsKey(task.targetCompatibility))
    {
  12. AbrarSyed revised this gist May 23, 2014. 1 changed file with 18 additions and 27 deletions.
    45 changes: 18 additions & 27 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -1,34 +1,25 @@
    allprojects {
    afterEvaluate {
    def files = [
    'rt.jar',
    'charsets.jar',
    'deploy.jar',
    'javaws.jar',
    'jce.jar',
    'jsse.jar',
    'management-agent.jar',
    'plugin.jar',
    'resources.jar'
    def versions = [
    '1.6' : "/opt/java6/jre/lib/"
    ]
    def base6 = "/opt/java6/jre/lib/" // change this to your actual java6 location
    def path6 = files.collect({ return base6 + it }).join(File.pathSeparator)
    tasks.withType(Compile) { task ->
    if (task.targetCompatibility == '1.6')
    {
    task.options.fork = true;
    task.options.bootClasspath = path6
    }


    // convert map to classpaths
    versions.collectEntries { key, value ->
    def path = new File(value)
    value = path.listFiles().findAll { it.getPath().endsWith(".jar") }
    value = value.join(File.pathSeparator)
    return [key, value]
    }
    tasks.withType(JavaCompile) { task ->
    if (task.targetCompatibility == '1.6')
    {
    task.options.fork = true;
    task.options.bootClasspath = path6
    }

    }

    def apply = { task ->
    if (versions.containsKey(task.targetCompatibility))
    {
    task.options.fork = true;
    task.options.bootClasspath = versions[task.targetCompatibility]
    }
    }
    tasks.withType(Compile, apply)
    tasks.withType(JavaCompile, apply)
    }
    }
  13. AbrarSyed revised this gist Apr 1, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ allprojects {
    'plugin.jar',
    'resources.jar'
    ]
    def base6 = "/opt/java6/jre/lib/"
    def base6 = "/opt/java6/jre/lib/" // change this to your actual java6 location
    def path6 = files.collect({ return base6 + it }).join(File.pathSeparator)
    tasks.withType(Compile) { task ->
    if (task.targetCompatibility == '1.6')
  14. AbrarSyed revised this gist Mar 12, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ allprojects {
    'charsets.jar',
    'deploy.jar',
    'javaws.jar',
    'jce.ar',
    'jce.jar',
    'jsse.jar',
    'management-agent.jar',
    'plugin.jar',
  15. AbrarSyed revised this gist Mar 11, 2014. 1 changed file with 16 additions and 3 deletions.
    19 changes: 16 additions & 3 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -1,21 +1,34 @@
    allprojects {
    afterEvaluate {
    def files = [
    'rt.jar',
    'charsets.jar',
    'deploy.jar',
    'javaws.jar',
    'jce.ar',
    'jsse.jar',
    'management-agent.jar',
    'plugin.jar',
    'resources.jar'
    ]
    def base6 = "/opt/java6/jre/lib/"
    def path6 = files.collect({ return base6 + it }).join(File.pathSeparator)
    tasks.withType(Compile) { task ->
    if (task.targetCompatibility == '1.6')
    {
    task.options.fork = true;
    task.options.bootClasspath = "/opt/java6/jre/lib/rt.jar"
    task.options.bootClasspath = path6
    }

    }
    tasks.withType(JavaCompile) { task ->
    if (task.targetCompatibility == '1.6')
    {
    task.options.fork = true;
    task.options.bootClasspath = "/opt/java6/jre/lib/rt.jar"
    task.options.bootClasspath = path6
    }

    }

    }
    }
    }
  16. AbrarSyed created this gist Mar 8, 2014.
    21 changes: 21 additions & 0 deletions bootstrap.gradle
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    allprojects {
    afterEvaluate {
    tasks.withType(Compile) { task ->
    if (task.targetCompatibility == '1.6')
    {
    task.options.fork = true;
    task.options.bootClasspath = "/opt/java6/jre/lib/rt.jar"
    }

    }
    tasks.withType(JavaCompile) { task ->
    if (task.targetCompatibility == '1.6')
    {
    task.options.fork = true;
    task.options.bootClasspath = "/opt/java6/jre/lib/rt.jar"
    }

    }

    }
    }