buildscript {
  // configure the repositories and dependencies for Gradle itself
  repositories {
    google()
    mavenCentral()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:8.13.2'
  }
}

allprojects {
  repositories {
    google()
    mavenCentral()
  }
}

apply plugin: 'idea'

tasks.register('clean', Delete) {
  delete rootProject.buildDir
}

tasks.register('test') {
  doLast {
    exec {
      commandLine 'sh', '-c', 'adb -a logcat -c && \
        adb -a shell am start net.sourceforge.smallbasic/net.sourceforge.smallbasic.MainActivity && \
        adb -a logcat DEBUG:I smallbasic:I AndroidRuntime:E *:S'
    }
  }
}
