Skip to content

Commit

Permalink
Remove use of deprecated/removed APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
big-guy committed Oct 3, 2019
1 parent c0c83a6 commit 373d3b0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Expand Up @@ -14,7 +14,7 @@
@CacheableTask
public class GenerateDummyCppSource extends DefaultTask {
private final Property<String> symbolName = getProject().getObjects().property(String.class);
private final RegularFileProperty outputFile = newOutputFile();
private final RegularFileProperty outputFile = getProject().getObjects().fileProperty();

@TaskAction
private void doGenerate() throws IOException {
Expand Down
6 changes: 3 additions & 3 deletions cpp/provisionable-tool-chains/buildSrc/build.gradle
Expand Up @@ -28,7 +28,7 @@ class DownloadToolChainTask extends DefaultTask {
final Property<URL> fromUrl = project.objects.property(URL)

@OutputFile
final RegularFileProperty outputFile = newOutputFile()
final RegularFileProperty outputFile = project.objects.fileProperty()

@TaskAction
private void download() {
Expand All @@ -38,13 +38,13 @@ class DownloadToolChainTask extends DefaultTask {

class ExtractToolChainTask extends DefaultTask {
@InputFile
final RegularFileProperty toolChainArchive = newInputFile()
final RegularFileProperty toolChainArchive = project.objects.fileProperty()

// Currently cannot use the OutputDirectory annotation on directory containing symbolic links to non-existing files
// See https://github.com/gradle/gradle/issues/4428
// Use a done file instead
//@OutputDirectory
final DirectoryProperty toolChainLocation = newOutputDirectory()
final DirectoryProperty toolChainLocation = project.objects.directoryProperty()

@OutputFile // See comment on toolChainLocation property
final Provider<File> doneFile = project.provider {new File(toolChainLocation.get().asFile.absolutePath + ".done")}
Expand Down
Expand Up @@ -28,7 +28,7 @@ class DownloadToolChainTask extends DefaultTask {
final Property<URL> fromUrl = project.objects.property(URL)

@OutputFile
final RegularFileProperty outputFile = newOutputFile()
final RegularFileProperty outputFile = project.objects.fileProperty()

@TaskAction
private void download() {
Expand All @@ -38,13 +38,13 @@ class DownloadToolChainTask extends DefaultTask {

class ExtractToolChainTask extends DefaultTask {
@InputFile
final RegularFileProperty toolChainArchive = newInputFile()
final RegularFileProperty toolChainArchive = project.objects.fileProperty()

// Currently cannot use the OutputDirectory annotation on directory containing symbolic links to non-existing files
// See https://github.com/gradle/gradle/issues/4428
// Use a done file instead
//@OutputDirectory
final DirectoryProperty toolChainLocation = newOutputDirectory()
final DirectoryProperty toolChainLocation = project.objects.directoryProperty()

@OutputFile // See comment on toolChainLocation property
final Provider<File> doneFile = project.provider {new File(toolChainLocation.get().asFile.absolutePath + ".done")}
Expand Down
Expand Up @@ -28,7 +28,7 @@ class DownloadToolChainTask extends DefaultTask {
final Property<URL> fromUrl = project.objects.property(URL)

@OutputFile
final RegularFileProperty outputFile = newOutputFile()
final RegularFileProperty outputFile = project.objects.fileProperty()

@TaskAction
private void download() {
Expand All @@ -38,13 +38,13 @@ class DownloadToolChainTask extends DefaultTask {

class ExtractToolChainTask extends DefaultTask {
@InputFile
final RegularFileProperty toolChainArchive = newInputFile()
final RegularFileProperty toolChainArchive = project.objects.fileProperty()

// Currently cannot use the OutputDirectory annotation on directory containing symbolic links to non-existing files
// See https://github.com/gradle/gradle/issues/4428
// Use a done file instead
//@OutputDirectory
final DirectoryProperty toolChainLocation = newOutputDirectory()
final DirectoryProperty toolChainLocation = project.objects.directoryProperty()

@OutputFile // See comment on toolChainLocation property
final Provider<File> doneFile = project.provider {new File(toolChainLocation.get().asFile.absolutePath + ".done")}
Expand Down
6 changes: 3 additions & 3 deletions swift/provisionable-tool-chains/buildSrc/build.gradle
Expand Up @@ -28,7 +28,7 @@ class DownloadToolChainTask extends DefaultTask {
final Property<URL> fromUrl = project.objects.property(URL)

@OutputFile
final RegularFileProperty outputFile = newOutputFile()
final RegularFileProperty outputFile = project.objects.fileProperty()

@TaskAction
private void download() {
Expand All @@ -38,13 +38,13 @@ class DownloadToolChainTask extends DefaultTask {

class ExtractToolChainTask extends DefaultTask {
@InputFile
final RegularFileProperty toolChainArchive = newInputFile()
final RegularFileProperty toolChainArchive = project.objects.fileProperty()

// Currently cannot use the OutputDirectory annotation on directory containing symbolic links to non-existing files
// See https://github.com/gradle/gradle/issues/4428
// Use a done file instead
//@OutputDirectory
final DirectoryProperty toolChainLocation = newOutputDirectory()
final DirectoryProperty toolChainLocation = project.objects.directoryProperty()

@OutputFile // See comment on toolChainLocation property
final Provider<File> doneFile = project.provider {new File(toolChainLocation.get().asFile.absolutePath + ".done")}
Expand Down

0 comments on commit 373d3b0

Please sign in to comment.