Skip to content
This repository was archived by the owner on Sep 3, 2019. It is now read-only.

Commit be243d3

Browse files
committed
Use ext.commonDir to locate config.groovy and libs
Also added osmf.swc
1 parent c772f05 commit be243d3

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

build.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
def configFile = file('config.groovy')
1+
ext.commonDir = '.'
32
apply from: 'scratch.gradle'
43

54
srcDirs = ['src']

scratch.gradle

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
buildscript {
32
repositories {
43
mavenCentral()
@@ -21,19 +20,23 @@ repositories {
2120

2221
apply plugin: org.gradlefx.plugins.GradleFxPlugin
2322

23+
def commonDir = ext.commonDir
2424
def variant = hasProperty('variant') ? variant : 'New'
2525
println "Variant is: $variant"
26-
def config = new ConfigSlurper(variant).parse(file('config.groovy').toURL())
26+
def config = new ConfigSlurper(variant).parse(file("${commonDir}/config.groovy").toURL())
2727

2828
type = 'mobile'
2929
version = '1.0-SNAPSHOT'
3030
frameworkLinkage = 'none'
3131
playerVersion = config.get('playerVersion')
3232

3333
dependencies {
34-
flexSDK group: 'org.apache', name: 'apache-flex-sdk', version:'4.10.0', ext: 'zip'
35-
external group: 'macromedia.com', name: 'playerglobal', version: playerVersion.replace('.','_'), ext: 'swc'
36-
merged files('libs/as3corelib.swc', 'libs/blooddy_crypto.swc')
34+
flexSDK group: 'org.apache', name: 'apache-flex-sdk', version: '4.10.0', ext: 'zip'
35+
external group: 'macromedia.com', name: 'playerglobal', version: playerVersion.replace('.', '_'), ext: 'swc'
36+
merged files(
37+
"${commonDir}/libs/as3corelib.swc",
38+
"${commonDir}/libs/blooddy_crypto.swc",
39+
)
3740
}
3841

3942
sdkAutoInstall {
@@ -43,6 +46,7 @@ sdkAutoInstall {
4346
def scratchFlashCommitID = "'dev'"
4447
additionalCompilerOptions = [
4548
"-library-path+=libs/framework.swc", // in the SDK's frameworks directory
49+
"-library-path+=libs/osmf.swc", // in the SDK's frameworks directory
4650
"-target-player=${playerVersion}",
4751
"-default-size=800,600",
4852
"-define+=SCRATCH::revision,${scratchFlashCommitID}",

0 commit comments

Comments
 (0)