File: prism-gradle.html

package info (click to toggle)
node-prismjs 1.30.0%2Bdfsg%2B~1.26.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,220 kB
  • sloc: javascript: 27,628; makefile: 9; sh: 7; awk: 4
file content (54 lines) | stat: -rw-r--r-- 1,353 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
<h2>Full example</h2>
<pre><code>apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "idea"

group = "com.mycompany.hadoopproject"
version = "1.0"

repositories {
    // Standard Maven 
    mavenCentral()
    maven {
        url "https://repository.cloudera.com/artifactory/cloudera-repos/"
    }
}

// Mimic Maven 'provided' configuration, as suggested in GRADLE-784
configurations {
    provided
}
sourceSets {
    main {
        compileClasspath += configurations.provided
    }
}

ext.hadoopVersion = "2.0.0-mr1-cdh4.0.1"
dependencies {
    provided "org.apache.hadoop:hadoop-client:${hadoopVersion}"

    // Example of adding a specific compile time dependency
    compile "com.google.guava:guava:11.0.2"

    testCompile "junit:junit:4.8.2"
}

// Java version selection
sourceCompatibility = 1.6
targetCompatibility = 1.6

eclipse {
    classpath {
        // Ensure Eclipse build output appears in build directory
        defaultOutputDir = file("${buildDir}/eclipse-classes")
        // Ensure the provided configuration jars are available in Eclipse
        plusConfigurations += configurations.provided
    }
}

// Emulate Maven shade plugin with a fat jar.
// http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-Creatingafatjar
jar {
    from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}</code></pre>