Gradle jsCompileClasspath time means what?


#1

Hi,

I am trying to get my js app compiling as fast as possible. I have a component library (wrapper for React Material UI) which I have compiled down to a jar and added to my local maven repository in the hope that this code won’t get fully compiled in my app that uses the library.

My simple app using the library takes around 9 seconds to build. Exploring the Gradle build scan, I see that about the 9 Seconds is taken up in jsCompileClasspath.

Can anyone tell me if this is this the actual js compilation time or is there some time taken up in some type of dependency resolution which I might be able to fix/shorten.

Just trying to get code change / browser update cycle as fast as possible, as using react directly is pretty quick… just don’t want to add too much time to the cycle otherwise it won’t be worth using it…

Thanks for any pointers,
Colin


#2

Sorry, resolved it… it was doing some type of dependency resolution… I had mistakenly a org.jetbrains:kotlin-react:16.4.2-pre.58-kotlin-1.3.0 dependency in the project and the component project had 16.5.2-pre.58-kotlin-1.3.0.

Making the “using” project and the component project use the same react dependencies brought the compile time down for my small test project to ~0s (can’t get much faster than that :slight_smile: )

Now just need to see if I can improve the webpack hot reloading cycle :slight_smile:.

Sorry for the post, was going to remove it but thought it might be useful to someone searching with a similar issue.