4

Hi I want to convert ant script to gradle.Is there a tool for automatic conversion?

I was trying Android Studio and found out that if you import a project with ant build it asks you that shall it covert it to gradle.Even when you click yes,it generates a gradle script containing

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {`
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.8.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

Does anyone know where I can find the converted gradle script,or any other method to do so?

vishine
  • 63
  • 8

1 Answers1

3

Concerning your question

Does anyone know where I can find the converted gradle script,or any other method to do so?

Gradle creates two build.gradle files: one at the project level, one in the project directory. app/src. The second might contain the directives you have been looking for.

You might want to have a look at a more detailed description of the Android Studio files.

If you came here to convert a generic ant to a gradle script

This works out-of-the-box as of AndroidStudio 1.3.

Community
  • 1
  • 1
serv-inc
  • 35,772
  • 9
  • 166
  • 188