build.gradle - Redirect Gradle output to a file -


i want have output gradle build available on screen in file. have found example of have problem running because missing dependency. here code using:

def tstamp = new date().format('yyyy-mm-dd_hh-mm-ss')  def buildlogdir = "${rootdir}/build/logs"  mkdir("${buildlogdir}")  def buildlog = new file("${buildlogdir}/${tstamp}_buildlog.log")    import org.gradle.logging.internal.*  system.setproperty('org.gradle.color.error', 'red')    gradle.services.get(loggingoutputinternal).addstandardoutputlistener (new standardoutputlistener () {      void onoutput(charsequence output) {          buildlog << output      }  })    gradle.services.get(loggingoutputinternal).addstandarderrorlistener (new standardoutputlistener () {      void onoutput(charsequence output) {          buildlog << output      }  })

the error getting: "could not unknown property 'loggingoutputinternal' root project 'testcode' of type org.gradle.api.project." know code works fine because able run using intellij. not able run command line though. need add dependency list able use it?


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -