forked from LIGHTASCENSIONS/freeze
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
94 lines (78 loc) · 2.43 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
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
ext.os = System.properties['os.name']
ext.isWindows = os.toLowerCase().contains("windows")
ext.isMacOS = os.toLowerCase().contains("mac os x")
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.ullink.gradle:gradle-nuget-plugin:2.15"
}
}
if(isWindows) {
apply plugin: "com.ullink.nuget"
task nugetConfig() {
def config = new File("${rootProject.projectDir}/packages.config")
def writer = new StringWriter()
def xml = new groovy.xml.MarkupBuilder(writer)
def packages = [["id": "berkeley.db.java7", "version": "5.3.28.1"]]
if(System.env.FREEZE_BIN_DIST == "all" || System.env.FREEZE_BIN_DIST == "cpp") {
packages.add(["id": "zeroc.ice.v140", "version": "${iceVersion}"])
packages.add(["id": "zeroc.freeze.v140", "version": "${iceVersion}"])
} else if(System.env.ICE_BIN_DIST == "all" || System.env.ICE_BIN_DIST == "cpp") {
packages.add(["id": "zeroc.ice.v140", "version": "${iceVersion}"])
}
xml.packages {
packages.each {
xml.package("id": it.id, "version": it.version)
}
}
config.write(writer.toString())
}
nugetRestore {
solutionDirectory = "${rootProject.projectDir}"
packagesDirectory = "${rootProject.projectDir}/packages"
}
}
subprojects {
project.version = iceVersion
project.group = "com.zeroc"
apply plugin: 'java'
apply plugin: 'idea'
apply from: "${rootProject.projectDir}/gradle/freeze.gradle"
repositories {
flatDir {
name "local"
dirs "${rootProject.projectDir}/lib"
}
if (slice.jarDir) {
flatDir {
name "local"
dirs slice.jarDir
}
}
if(this.devRepo) {
maven {
url this.devRepo
}
}
mavenCentral()
}
jar {
manifest {
attributes("Built-By": "ZeroC, Inc.")
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Xlint:-options"
}
idea.module {
excludeDirs -= file(buildDir)
buildDir.listFiles({d, f ->f != 'generated-src'} as FilenameFilter).each { excludeDirs += it }
}
}