我正在尝试将几个文件从源代码树复制到Gradle最终生成apk文件的目录中。构建似乎很好,但我似乎没有看到副本工作。我在我的模块build.gradle
中添加了以下任务task copySupportFiles(type: Copy){
from 'src/main/support'
into 'build/outputs/apk'
include '**/.dat'
include '**/.txt'
}
assembleDebug {}.doLast{
tasks.copySupportFiles.execute()
}
答案 0 :(得分:5)
正如@Steffen Funke在评论中提到的那样,错误在附加的星号中:
sails.sockets.join(req, 'myCustomRoomName');
应为sails.sockets.broadcast("myCustomRoomName", "nameOfEvent", {someData: "can also be just string instead of obj, i prefer objects..."});
答案 1 :(得分:2)
您的doLast
应放在afterEvaluate
:
afterEvaluate {
assembleRelease.doLast {
tasks.copySupportFiles.execute()
}
}