lloydmeta / schwatcher

File-watching library for Scala. Built on Java 7's WatchService, RxScala and Akka actors.
MIT License
104 stars 14 forks source link

Gradle project, Intelli-J and Mac OS #70

Open nagabhushanreddy opened 7 years ago

nagabhushanreddy commented 7 years ago

My gradle build file looks like below and when I try to run below example the callbacks aren't fired. Any incompatibility issues?

https://github.com/lloydmeta/schwatcher/blob/master/src/example/usage.scala

/*

// Apply the scala plugin to add support for Scala apply plugin: 'scala'

// In this section you declare where to find the dependencies of your project repositories { // Use 'jcenter' for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() }

// In this section you declare the dependencies for your production and test code dependencies { compile 'org.scala-lang:scala-library:2.12.0' // https://mvnrepository.com/artifact/com.beachape.filemanagement/schwatcher_2.12 compile group: 'com.beachape.filemanagement', name: 'schwatcher_2.12', version: '0.3.3'

// We use Scalatest for testing our library
//testCompile 'junit:junit:4.12'
// https://mvnrepository.com/artifact/org.scalatest/scalatest_2.12
//testCompile group: 'org.scalatest', name: 'scalatest_2.12', version: '3.0.3'
//testRuntime group: 'org.scala-lang.modules', name: 'scala-xml_2.12', version: '1.0.6'

}

nagabhushanreddy commented 7 years ago

Tried below still did not help

fileMonitorActor ! RegisterCallback(
        event = ENTRY_MODIFY,
        path = desktopFile,
        callback =  modifyCallbackFile,
        modifier = Some(SensitivityWatchEventModifier.HIGH)
      )
lloydmeta commented 7 years ago

Hmm, I've never used Gradle, but the lib should work regardless unless there's something I don't know about Gradle. I'm on Mac OS myself and it works fine.