aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs
blob: 3db80271762e77a264b74a7f94047e22ed690889 (plain)
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
import qbs
import qbs.TextFile

Product {
    type: "mytype"
    files: "dependency.txt"
    FileTagger {
        patterns: "*.txt"
        fileTags: ["txt"]
    }
    Transformer {
        explicitlyDependsOn: "txt"
        Artifact {
            filePath: "test.mytype"
            fileTags: product.type
        }
        prepare: {
            var cmd = new JavaScriptCommand();
            cmd.description = "Creating output artifact";
            cmd.highlight = "codegen";
            cmd.sourceCode = function() {
                var file = new TextFile(output.filePath, TextFile.WriteOnly);
                file.truncate();
                file.close();
            }
            return cmd;
        }
    }
}