Results are not uploaded in sonar after gradle scan

I am trying to test if my current gradle version 1.12 is compatible with sonar 7.9 and I have created a sample project in github and cloned it and started the task “gradle sonarqube”.
My analysis was successful, but on sonar webpage it says "“The main branch has no lines of code.”

This is my sample and only file in the repo

print("This is sample program")
print("This is my password")

I am starting the scan using this command
gradle sonarqube -Dsonar.login=user -Dsonar.password=password --debug

my build.gradle

buildscript {
  repositories {
    maven {
      url ""
  dependencies {
    classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:"

apply plugin: 'org.sonarqube'

Can some one please tell me what is the issue here?


Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.x → 8.9.9 → 9.5 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.