M
M
MaxLich2018-01-18 14:16:06
Java
MaxLich, 2018-01-18 14:16:06

The Gradle project is not published to the local Maven repository due to the fact that it uses Russian text in the source codes. How to fix it?

Hello. If I use Russian text in the program source codes (in comments or in button names, etc.), then the project is not published to the local maven repository. Errors of this kind:

C:\Users\...\IProfile.java:71: error: unmappable character for encoding Cp1251
visibleName = "Р?стория осмотров",

If you use Unicode codes instead of text in Russian, then everything works. How to make it work with pure readable Russian text? What should be written in build.gradle?
PS I do everything in IntelliJ IDEA. There are file encoding settings, and this is what I have selected there:
5a6088106869a345915842.png
Also in build.gradle there is this line:
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxLich, 2018-01-18
@MaxLich

You need to add the following to build.gradle:

tasks.withType(Javadoc) { options.encoding = 'UTF-8' }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question