-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
60 lines (50 loc) · 1.63 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
plugins {
id 'net.wooga.unity' version '0.16.1'
id 'net.wooga.github' version '0.6.1'
id 'net.wooga.paket' version '0.10.1'
}
// if version is set, property from paket.template will be overriden
version = "0.1.5"
// export unity package
exportUnityPackage {
inputFiles file("Unity.StringMatcher/Assets/StringMatcher")
}
// define batchmode task for unitypackage creation
unity {
defaultBuildTarget = "android"
projectPath = file("Unity.StringMatcher")
}
// Define publish task for nuget
publishing {
repositories {
nuget {
name "nuget"
url "https://www.nuget.org/api/v2/package"
}
}
}
// Define publish task for github (releases)
githubPublish {
repositoryName "marcolink/StringMatcher"
draft = true
tagName = project.version
releaseName = project.version
from configurations.archives
}
// add binaries to release
configurations.archives.extendsFrom(configurations.nupkg)
configurations.archives.extendsFrom(configurations.unitypackage)
githubPublish.dependsOn {configurations.archives}
githubPublish.dependsOn {configurations.unitypackage}
project.afterEvaluate {
Configuration paketConfiguration = project.configurations.nupkg
Configuration unitypackageConfiguration = project.configurations.unitypackage
paketConfiguration.allArtifacts.each {
println(it.file)
project.dependencies.add("archives", project.files(it.file).builtBy(it.buildDependencies))
}
unitypackageConfiguration.allArtifacts.each {
println(it.file)
project.dependencies.add("archives", project.files(it.file).builtBy(it.buildDependencies))
}
}