-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'joelittlejohn:master' into issues/1123
- Loading branch information
Showing
8 changed files
with
96 additions
and
32 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
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
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
47 changes: 47 additions & 0 deletions
47
...-gradle-plugin/src/integrationTest/groovy/org/jsonschema2pojo/gradle/GradleBuildIT.groovy
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,47 @@ | ||
/** | ||
* Copyright © 2010-2014 Nokia | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.jsonschema2pojo.gradle | ||
|
||
import org.gradle.tooling.BuildLauncher | ||
import org.gradle.tooling.GradleConnector | ||
import org.gradle.tooling.ProjectConnection | ||
import org.junit.Test | ||
|
||
class GradleBuildIT { | ||
|
||
@Test | ||
void java() { | ||
build("example/java"); | ||
} | ||
|
||
void build(String projectDir) { | ||
GradleConnector connector = GradleConnector.newConnector() | ||
connector.useGradleVersion("5.6") | ||
connector.forProjectDirectory(new File(projectDir)) | ||
ProjectConnection connection = connector.connect() | ||
try { | ||
BuildLauncher launcher = connection.newBuild() | ||
launcher.setStandardOutput(System.out); | ||
launcher.setStandardError(System.err); | ||
launcher.forTasks("build") | ||
launcher.addArguments("--stacktrace") | ||
launcher.run() | ||
} finally { | ||
connection.close() | ||
} | ||
} | ||
|
||
} |
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