Your code does not compile, that doesn't sound like a Gradle problem. If you want to program you should probably first learn the language and how things work. Using AI is pointless. Today's AI are not suitable to do things you couldn't do yourself. They are basically next-word guessers and often guess horribly wrong. They are great in giving answers that look correct, but utterly bad in giving answers that are correct. They are great to do things you could do yourself but are too lazy (the good kind of lazy, not the bad one). But you always have to understand what it produced and what it did wrongly to fix the non-sense it produced.