What is the syntax for writing comments in build.gradle file?

Machado picture Machado · Sep 14, 2015 · Viewed 79.8k times · Source

Looking down this build.gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "package.myapp"
        minSdkVersion 19
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.nineoldandroids:library:2.4.0'
}

What if I would like to write a comment on why did I chose this library for this project,

what is the syntax for writing comments in build.gradle file?

Answer

Simas picture Simas · Sep 14, 2015

Easy:

// Single line comment

/*
 Multi
 line
 comment
*/