Skip to content

Commit

Permalink
Fix #14: Remove deprecated API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
asarkar authored Jul 31, 2020
2 parents 6d9fc09 + c2ec1f7 commit 407b570
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI Pipeline
on: [push, pull_request]
on: [push]

jobs:
Build:
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pluginImplementationClass = org.asarkar.gradle.BuildTimeTrackerPlugin
pluginDeclarationName = buildTimeTrackerPlugin

projectGroup = org.asarkar.gradle
projectVersion = 2.0.1
projectVersion = 2.0.2

jUnit5Version = 5.6.2
assertJVersion = 3.16.1
Expand Down
15 changes: 2 additions & 13 deletions src/main/kotlin/org/asarkar/gradle/TimingRecorder.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package org.asarkar.gradle

import org.gradle.BuildListener
import org.gradle.BuildAdapter
import org.gradle.BuildResult
import org.gradle.api.Task
import org.gradle.api.execution.TaskExecutionListener
import org.gradle.api.initialization.Settings
import org.gradle.api.invocation.Gradle
import org.gradle.api.logging.Logger
import org.gradle.api.plugins.ExtensionAware
Expand All @@ -13,7 +12,7 @@ import org.gradle.api.tasks.TaskState
import java.time.Duration
import java.time.Instant

class TimingRecorder(val ext: BuildTimeTrackerPluginExtension) : TaskExecutionListener, BuildListener {
class TimingRecorder(val ext: BuildTimeTrackerPluginExtension) : TaskExecutionListener, BuildAdapter() {
private lateinit var taskStarted: Instant
private lateinit var buildStarted: Instant
private val taskDurations = mutableListOf<Pair<String, Long>>()
Expand Down Expand Up @@ -48,16 +47,6 @@ class TimingRecorder(val ext: BuildTimeTrackerPluginExtension) : TaskExecutionLi
.print(PrinterInput(buildDuration, taskDurations, ext))
}

override fun settingsEvaluated(settings: Settings) {
}

override fun projectsLoaded(gradle: Gradle) {
}

override fun buildStarted(gradle: Gradle) {

}

override fun projectsEvaluated(gradle: Gradle) {
buildStarted = Instant.now()
}
Expand Down

0 comments on commit 407b570

Please sign in to comment.