1 Star 5 Fork 2

鸽子/easy-scratch2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
scratch.gradle 2.29 KB
一键复制 编辑 原始数据 按行查看 历史
鸽子 提交于 2020-01-16 16:09 . Scratch2.0 init
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.gradlefx', name: 'gradlefx', version: '1.2.0'
}
}
repositories {
ivy {
name 'Apache Flex'
artifactPattern 'http://archive.apache.org/dist/flex/[revision]/binaries/[module]-[revision]-bin.[ext]'
}
ivy {
name 'Player Globals'
artifactPattern 'http://fpdownload.macromedia.com/get/flashplayer/installers/archive/[module]/[module][revision].[ext]'
}
}
apply plugin: org.gradlefx.plugins.GradleFxPlugin
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 = ext.commonDir
def target = hasProperty('target') ? target : '11.6'
println "Target is: $target"
def config = new ConfigSlurper(target).parse(file("${commonDir}/config.groovy").toURL())
type = 'mobile'
version = '1.0-SNAPSHOT'
frameworkLinkage = 'none'
buildDir = "${buildDir}/${target}" // GradleFX does an out-of-date check on the whole build dir
output = config.get('output')
playerVersion = config.get('playerVersion')
def scratchFlashCommitID = getCommitID(commonDir)
println "Commit ID for scratch-flash is: ${scratchFlashCommitID}"
dependencies {
flexSDK group: 'org.apache', name: 'apache-flex-sdk', version: '4.15.0', ext: 'zip'
external group: 'macromedia.com', name: 'playerglobal', version: playerVersion.replace('.', '_'), ext: 'swc'
merged files(
"${commonDir}/libs/as3corelib.swc",
"${commonDir}/libs/blooddy_crypto.swc",
"${commonDir}/libs/grabcut.swc"
)
}
sdkAutoInstall {
showPrompts = false
}
additionalCompilerOptions = [
"-library-path+=libs/framework.swc", // in the SDK's frameworks directory
"-library-path+=libs/osmf.swc", // in the SDK's frameworks directory
"-target-player=${playerVersion}",
"-default-size=800,600",
"-define+=SCRATCH::revision,'${scratchFlashCommitID}'",
"-advanced-telemetry",
]
additionalCompilerOptions += config.get('additionalCompilerOptions')
task wrapper(type: Wrapper) {
gradleVersion = '2.5'
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
ActionScript
1
https://gitee.com/chengyu2333/scratch2.git
[email protected]:chengyu2333/scratch2.git
chengyu2333
scratch2
easy-scratch2
master

搜索帮助