-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
74 lines (64 loc) · 2.55 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
/*
* This build file was generated by the Gradle 'init' task.
*
* This generated file contains a commented-out sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/4.4.1/userguide/tutorial_java_projects.html
*/
import org.gradle.internal.os.OperatingSystem;
//http://doc.gradlefx.org/en/latest/basic_setup.html
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.gradlefx', name: 'gradlefx', version: '1.4.0'
}
}
apply plugin: 'gradlefx'
ext.getCommitID = { repository ->
def dirty = "git status --porcelain --ignore-submodules=dirty".execute(null, file(repository)).text.trim() ? "-dirty" : ""
def revision = "git rev-parse --short HEAD".execute(null, file(repository)).text.trim()
return revision ? revision + dirty : 'unknown'
}
def commonDir = '.'
type = 'mobile'
frameworkLinkage = 'merged'
playerVersion = '23.0'
output = 'scratch'
def sageVersion = "${getCommitID(commonDir)}-build${project.hasProperty("buildId") ? project.property("buildId") : "manual"}"
println(sageVersion)
project.ext.set("osname", OperatingSystem.current().isWindows() ? 'win' : 'mac')
sdkAutoInstall {
showPrompts = false
}
repositories {
ivy {
name 'Apache Flex'
// pattern for url http://archive.apache.org/dist/flex/4.16.1/binaries/apache-flex-sdk-4.16.1-bin.zip
artifactPattern 'http://archive.apache.org/dist/flex/[revision]/binaries/[module]-[revision]-bin.[ext]'
}
ivy {
name 'Adobe Air SDK'
artifactPattern 'http://download.macromedia.com/air/'+project.osname+'/download/[revision]/[module].[ext]'
}
ivy {
name 'Player Globals'
artifactPattern 'http://fpdownload.macromedia.com/get/flashplayer/installers/archive/[module]/[module][revision].[ext]'
}
}
dependencies {
flexSDK group: 'org.apache', name: 'apache-flex-sdk', version: '4.16.1', ext: OperatingSystem.current().isWindows() ? 'zip' : 'tar.gz'
airSDK group: 'com.adobe', name: 'AdobeAIRSDK', version: '23.0', ext: OperatingSystem.current().isWindows() ? 'zip' : 'tbz2'
external group: 'macromedia.com', name: 'playerglobal', version: playerVersion.replace('.', '_'), ext: 'swc'
merged files(
"./libs/blooddy_crypto.swc"
)
}
additionalCompilerOptions = [
"-target-player=${playerVersion}",
"-define+=SCRATCH::allow3d,false",
"-define+=SCRATCH::sageVersion,\"'${sageVersion}'\""
]
srcDirs = ['src']
mainClass = 'Scratch.as'