gradle-android-scala-plugin icon indicating copy to clipboard operation
gradle-android-scala-plugin copied to clipboard

Compile Daemon

Open Nutomic opened this issue 11 years ago • 5 comments

Is there any way to use the Scala compile daemon with this plugin? There's an option described here, but it doesn't work with this plugin.

On a related note, Android Studio does not seem to perform automatic builds either (all the boxes in Project Settings -> Compiler are checked).

Nutomic avatar Dec 07 '14 01:12 Nutomic

Adding following configuration may work. But it isn't well tested.

tasks.withType(ScalaCompile) {
    scalaCompileOptions.useCompileDaemon = true
}

saturday06 avatar Dec 07 '14 01:12 saturday06

Okay I added that, although I'm not sure how to test if it works. There's no extra CPU usage after changes, and incremental compile after a minor change is about 45s (clean build is actually at 50s, looks like something's wrong there).

Might be worth adding to the readme anyway.

Nutomic avatar Dec 07 '14 09:12 Nutomic

Thanks. I added it by https://github.com/saturday06/gradle-android-scala-plugin/commit/6b6faacabe688db9de37a5a9ccbd213aee6462b3 I thinks, I should check that incremental compilation feature is really enabled :(

saturday06 avatar Dec 07 '14 11:12 saturday06

Lol, that would be useful :D

Nutomic avatar Dec 07 '14 13:12 Nutomic

I don't know whats happening here. When i do a build i get a shortlived process like this

/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Duser.country=SE -Duser.language=sv -Duser.variant -cp /Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/gradle-base-services-2.2.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/gradle-core-2.2.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/gradle-cli-2.2.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/gradle-native-2.2.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/gradle-messaging-2.2.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/slf4j-api-1.7.7.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/logback-classic-1.0.13.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/logback-core-1.0.13.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/jul-to-slf4j-1.7.7.jar:/Users/arneball/.gradle/wrapper/dists/gradle-2.2-all/1vevkra640w3rb9hkuw50q5we/gradle-2.2/lib/guava-jdk5-17.0.jar org.gradle.process.internal.launcher.GradleWorkerMain 'Gradle Compiler Daemon 1'

And that process dies right after scala compilation is done. I wonder if that newly spawned process in turn is spawning Zinc and then taking it down or something. Just guessing here.

Arneball avatar Dec 11 '14 16:12 Arneball