Skip to content

Commit

Permalink
Migrate task definations to task.register
Browse files Browse the repository at this point in the history
Signed-off-by: utzcoz <utzcoz@outlook.com>
  • Loading branch information
utzcoz committed Apr 5, 2023
1 parent 7a66ea7 commit 424b77d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Expand Up @@ -102,7 +102,7 @@ gradle.projectsEvaluated {
}
}

task aggregateJsondocs(type: Copy) {
tasks.register('aggregateJsondocs', Copy) {
gradle.projectsEvaluated {
project.subprojects.findAll { it.plugins.hasPlugin(ShadowsPlugin) }.each { subproject ->
dependsOn subproject.tasks["compileJava"]
Expand All @@ -112,12 +112,12 @@ task aggregateJsondocs(type: Copy) {
into "$buildDir/docs/json"
}

task aggregateDocs {
tasks.register('aggregateDocs') {
dependsOn ':aggregateJavadocs'
dependsOn ':aggregateJsondocs'
}

task prefetchSdks() {
tasks.register('prefetchSdks') {
AndroidSdk.ALL_SDKS.each { androidSdk ->
doLast {
println("Prefetching ${androidSdk.coordinates}...")
Expand All @@ -136,7 +136,7 @@ task prefetchSdks() {
}
}

task prefetchInstrumentedSdks() {
tasks.register('prefetchInstrumentedSdks') {
AndroidSdk.ALL_SDKS.each { androidSdk ->
doLast {
println("Prefetching ${androidSdk.preinstrumentedCoordinates}...")
Expand Down Expand Up @@ -166,7 +166,7 @@ private void shellExec(String mvnCommand) {
if (process.exitValue() != 0) System.exit(1)
}

task prefetchDependencies() {
tasks.register('prefetchDependencies') {
doLast {
allprojects.each { p ->
p.configurations.each { config ->
Expand Down
6 changes: 3 additions & 3 deletions preinstrumented/build.gradle
Expand Up @@ -21,7 +21,7 @@ dependencies {
implementation project(":sandbox")
}

task instrumentAll {
tasks.register('instrumentAll') {
dependsOn ':prefetchSdks'
dependsOn 'build'

Expand All @@ -42,11 +42,11 @@ task instrumentAll {
}
}

task('sourcesJar', type: Jar) {
tasks.register('sourcesJar', Jar) {
archiveClassifier = "sources"
}

task('javadocJar', type: Jar) {
tasks.register('javadocJar', Jar) {
archiveClassifier = "javadoc"
}

Expand Down

0 comments on commit 424b77d

Please sign in to comment.