Where do resource files go in a Gradle project that builds a Java 9 module?

Update (25 March 2020): There has been significant progress towards proper JPMS support. A nightly build of Gradle 6.4 now includes options to develop with Java 9 modules natively. See https://github.com/gradle/gradle/issues/890#issuecomment-603289940 . Update (29 September 2020): Since Gradle 6.4 (current release as of this update is 6.6.1) you can now support JPMS modules natively in … Read more

Error:Could not initialize class com.android.sdklib.repositoryv2.AndroidSdkHandler

This problem occurs when there are multiple JDKs installed in your system, I had the same issue as I had mistakenly installed oracle-jdk-9 and Android studio requires oracle-jdk-8 If you are using Ubuntu you can install jdk-8 from this question. So, Make following changes as shown below: Press ctrl+shift+alt+s that will open project structure which … Read more

Getting Gradle error “Could not reserve enough space for object heap” constantly in Intellij IDEA

I got the same error in Visual Studio 2015 with cordova 5.1.1 under Windows 10. To solve the issue, set this environment variable: _JAVA_OPTIONS=-Xmx512M Right click on start-button and open “System” Search for “Advanced system settings” and open it Click the button “Environment Variables …” In System Variables, click “New…” New Variable Name: _JAVA_OPTIONS New … Read more

How to start Spring Boot app in Spock Integration Test

The problem is that Spock Spring is looking for Spring’s @ContextConfiguration annotation and doesn’t manage to find it. Strictly speaking MyTestSpec is annotated with @ContextConfiguration as it’s a meta-annotation on @SpringApplicationConfiguration but Spock Spring doesn’t consider meta-annotations as part of its search. There’s an issue to address this limitation. In the meantime you can work … Read more

Automatic versioning of Android build using git describe with Gradle

Put the following in your build.gradle file for the project. There’s no need to modify the manifest directly: Google provided the necessary hooks into their configuration. def getVersionCode = { -> try { def code = new ByteArrayOutputStream() exec { commandLine ‘git’, ‘tag’, ‘–list’ standardOutput = code } return code.toString().split(“\n”).size() } catch (ignored) { return … Read more