-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recursively apply dependencyBuildSettings
For now, only "dflags" is used
- Loading branch information
1 parent
86afb94
commit e61a1d5
Showing
11 changed files
with
106 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Let custom build settings to be defined for dependencies | ||
|
||
For example; | ||
` | ||
{ | ||
"description": "A simple vibe.d server application.", | ||
"license": "proprietary", | ||
"name": "dubtest", | ||
|
||
"dependencies": { | ||
"vibe-d": { "version" : "~>0.9.2", "dflags" : ["-preview=in"] } | ||
} | ||
} | ||
` | ||
|
||
`-preview=in` will be applied to `vibe-d` and all of its dependencies. | ||
Any BuildSettings field can be used, parsing support is present. But, | ||
for now only, dflags is taken into account when compiling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
depend.json | ||
depend2.json | ||
depen-build-settings.json | ||
depen-build-settings |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"targetType": "library", | ||
"description": "A minimal D application.", | ||
"name": "depend2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import std.stdio; | ||
|
||
extern (C) void depend2_func() | ||
{ | ||
writeln("depend2_func"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"targetType": "library", | ||
"description": "A minimal D application.", | ||
"name": "depend1", | ||
|
||
"dependencies": { | ||
"depend2": { "version" : "*" } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import std.stdio; | ||
|
||
extern (C) void depend2_func(); | ||
|
||
extern (C) void depend1_func() | ||
{ | ||
writeln("depend1_func"); | ||
depend2_func(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"description": "A minimal D application.", | ||
"name": "depen-build-settings", | ||
|
||
"dependencies": { | ||
"depend1": { "version" : "*", "dflags" : ["-X"] } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"fileVersion": 1, | ||
"versions": { | ||
"depend1": {"path":"depend/"}, | ||
"depend2": {"path":"depend/depend2/"} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import std.stdio; | ||
import std.file; | ||
|
||
extern (C) void depend1_func(); | ||
|
||
void main() | ||
{ | ||
writeln("Edit source/app.d to start your project."); | ||
depend1_func(); | ||
assert(exists("depend2.json")); | ||
assert(exists("depend.json")); | ||
} |