Skip to content

Instantly share code, notes, and snippets.

@breskeby
Last active February 6, 2019 15:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save breskeby/fdda6cc8bfa7e56b307592f8e4de3089 to your computer and use it in GitHub Desktop.
Example gradle multiproject with deprecated usage
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.gradle:build-scan-plugin:2.1'
}
}
apply plugin: 'com.gradle.build-scan'
buildScan {
publishAlways()
server = 'http://localhost:5050'
}
rootProject.buildFileName = 'multiproject-with-deprecations.gradle'
def buildSize = 100
buildSize.times {
include "sub$it"
def subFolder = new File("sub$it")
subFolder.mkdirs()
def subBuildFile = new File(f, "build.gradle")
subBuildFile.text = """
class CustomTask extends DefaultTask {
@OutputFile
RegularFileProperty target = newOutputFile()
@InputFile
@PathSensitive(PathSensitivity.RELATIVE)
RegularFileProperty inFile = newInputFile()
@OutputDirectory
DirectoryProperty outputDir = newOutputDirectory()
}
apply plugin:'findbugs'
tasks.create('customTask', CustomTask)
"""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment