Skip to content

Commit

Permalink
Added a option to use the 'Legacy Build System' instead of 'New Buill…
Browse files Browse the repository at this point in the history
…d System' which became available from Xcode 9.
  • Loading branch information
kazuhidet committed Nov 2, 2018
1 parent 1b659ee commit 56f48d6
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/au/com/rayh/XCodeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ public class XCodeBuilder extends Builder implements SimpleBuildStep {
*/
@CheckForNull
private Boolean copyProvisioningProfile;
/**
* @since 2.0.9
*/
@CheckForNull
private Boolean useLegacyBuildSystem;

public Boolean getCleanBeforeBuild() {
return cleanBeforeBuild == null ? Boolean.valueOf(true) : cleanBeforeBuild;
Expand Down Expand Up @@ -832,6 +837,15 @@ public void setCopyProvisioningProfile(Boolean copyProvisioningProfile) {
this.copyProvisioningProfile = copyProvisioningProfile;
}

public Boolean getUseLegacyBuildSystem() {
return useLegacyBuildSystem == null ? Boolean.valueOf(false) : useLegacyBuildSystem;
}

@DataBoundSetter
public void setUseLegacyBuildSystem(Boolean useLegacyBuildSystem) {
this.useLegacyBuildSystem = useLegacyBuildSystem;
}

// Internally.
public void setSkipBuildStep(Boolean skipBuildStep) {
this.skipBuildStep = skipBuildStep;
Expand Down Expand Up @@ -1720,6 +1734,11 @@ else if ( StringUtils.isEmpty(configuration) ) {
}
}

if ( BooleanUtils.isTrue(useLegacyBuildSystem) ) {
commandLine.add("-UseModernBuildSystem=NO");
xcodeReport.append(", useLegacyBuildSystem: YES");
}

listener.getLogger().println(xcodeReport.toString());
returnCode = launcher.launch().envs(envs).cmds(commandLine).stdout(reportGenerator.getOutputStream()).pwd(projectRoot).join();
if ( BooleanUtils.isNotTrue(allowFailingBuildResults) ) {
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/au/com/rayh/XCodeBuilder/config.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
</f:entry>
</j:if>

<f:entry title="${%Use Legacy Build System?}" field="useLegacyBuildSystem" description="${%Use the old 'Legacy Build System' instead of 'New Build System' of Xcode 9 and later.}">
<f:checkbox title="${%Yes}" />
</f:entry>

<f:entry title="${%Target}" field="target" description="${%Leave empty for all targets}">
<f:textbox />
</f:entry>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,5 @@ Strip\ Swift\ Symbols?=Swift\u306e\u30b7\u30f3\u30dc\u30eb\u3092\u524a\u9664
If\ checked,\ symbols\ be\ stripped\ from\ Swift\ libraries\ when\ exporting\ the\ application\ to\ IPA.=\u30c1\u30a7\u30c3\u30af\u3055\u308c\u3066\u3044\u308b\u306a\u3089\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092IPA\u306b\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u969b\u306bIPA\u304b\u3089Swift\u306e\u30b7\u30f3\u30dc\u30eb\u3092\u524a\u9664\u3057\u307e\u3059\u3002
Copy\ provisioning\ profile=\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b
When\ the\ provisioning\ profile\ is\ specified\ in\ 'Provisioning\ profile\ UUID',\ copy\ the\ specified\ file\ to\ a\ predetermined\ place.=\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u300c\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u30d7\u30ed\u30d5\u30a1\u30a4\u30ebUUID\u300d\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u6307\u5b9a\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u6240\u5b9a\u306e\u5834\u6240\u306b\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u3002
Use\ Legacy\ Build\ System?=\u65e7\u6765\u306e\u30d3\u30eb\u30c9\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u7528\u3059\u308b
Use\ the\ old\ 'Legacy\ Build\ System'\ instead\ of\ 'New\ Build\ System'\ of\ Xcode\ 9\ and\ later.=Xcode 9\u4ee5\u964d\u306e New Build System \u306e\u4ee3\u308f\u308a\u306b\u53e4\u3044 Legacy Build System \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
~ The MIT License
~
~ Copyright (c) 2011 Ray Yamamoto Hilton
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->

<div>
<p>
Instead of "New Builld System" which became available from Xcode 9, we build the application using the legacy build system.<br />
There is a possibility that you can handle old projects that cause problems with the new build system.<br />
Also, since new output formats of logs are changed in the new build system, it is also useful when you want to handle logs with legacy third party tools.
</p>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
~ The MIT License
~
~ Copyright (c) 2011 Ray Yamamoto Hilton
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->

<div>
<p>
Xcode 9から利用可能となった"New Builld System"ではなく、旧来のビルドシステムを使ってアプリケーションのビルドを行います。<br />
それによって新しいビルドシステムでは問題が起きる古いプロジェクトを扱う事ができる可能性があります。<br />
また、新しいビルドシステムではログの出力フォーマットなどにも変更があるため、ログを旧来のサードパーティ製ツールで扱いたい場合にも便利です。
</p>
</div>

0 comments on commit 56f48d6

Please sign in to comment.