-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
97 lines (80 loc) · 2.49 KB
/
build.gradle
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* Copyright (C) 2015 asn007 aka Andrey Sinitsyn <[email protected]>
*
* This file (build.gradle) is part of nLoader.
*
* nLoader is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* nLoader is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with nLoader. If not, see <http://www.gnu.org/licenses/>.
*/
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
version = '0.1'
repositories {
mavenCentral()
}
configurations {
includeInJar {
description = 'Package dependencies into jar file'
transitive = true
}
}
task "create-dirs" << {
project.sourceSets*.each {
it.allSource.srcDirs.each {
println "$it" - "${projectDir}${File.separator}";
if (!(it.exists()))
it.mkdirs();
}
}
}
task listDependencies << {
configurations.each {
Configuration cfg -> println '*** CONFIGURATION ' + cfg.name + ' (' + cfg.description + ')' +'***'
cfg.each {
File file -> println file.name
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
distributionUrl = 'http://services.gradle.org/distributions/gradle-1.12-all.zip'
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
includeInJar group: 'com.eclipsesource.minimal-json', name: 'minimal-json', version: '0.9.2'
includeInJar project(':nLogger')
}
jar {
manifest {
attributes 'Manifest-Version':'1.0',
'Class-Path': '.'
}
}
jar.doFirst {
for (file in configurations.includeInJar) {
from file.isDirectory() ? file : zipTree(file)
}
}
sourceSets.main.compileClasspath += configurations.includeInJar
idea {
module {
scopes.PROVIDED.plus += configurations.includeInJar
}
}
eclipse {
classpath {
plusConfigurations += configurations.includeInJar
}
}