Advertisement
Guest User

build.gradle

a guest
Nov 1st, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.59 KB | None | 0 0
  1. buildscript {
  2.     repositories {
  3.     google()
  4.     maven {
  5.             url "https://maven.google.com"
  6.         }
  7.     jcenter { url "http://jcenter.bintray.com/" }
  8.     }
  9.  
  10.     dependencies {
  11.         classpath 'com.android.tools.build:gradle:3.1.0'
  12.     }
  13. }
  14.  
  15. task buildPythonDebug << {
  16.     exec {
  17.         commandLine "voc -v -p app -o build/intermediates/classes/debug app".split()
  18.     }
  19.     exec {
  20.         commandLine "voc -v -p app_packages -o build/intermediates/classes/debug app_packages".split()
  21.     }
  22. }
  23.  
  24. task buildPythonRelease << {
  25.     exec {
  26.         commandLine "voc -v -p app -o build/intermediates/classes/release app".split()
  27.     }
  28.     exec {
  29.         commandLine "voc -v -p app_packages -o build/intermediates/classes/release app_packages".split()
  30.     }
  31. }
  32.  
  33. task run << {
  34.     exec {
  35.         commandLine "adb shell am start -n n/a.helloworld_appname/android.Helloworld".split()
  36.     }
  37. }
  38.  
  39. apply plugin: 'com.android.application'
  40.  
  41. android {
  42.     compileSdkVersion 25
  43.     buildToolsVersion "27.0.3"
  44.  
  45.     defaultConfig {
  46.         minSdkVersion 15
  47.         targetSdkVersion 25
  48.         versionCode 1
  49.         versionName "1.0"
  50.     }
  51.     sourceSets {
  52.         main {
  53.             manifest.srcFile 'AndroidManifest.xml'
  54.             java.srcDirs = ['src']
  55.             res.srcDirs = ['res']
  56.         }
  57.     }
  58. }
  59.  
  60. project.afterEvaluate {
  61.     packageDebug.dependsOn buildPythonDebug
  62.     packageRelease.dependsOn buildPythonRelease
  63.     run.dependsOn installDebug
  64. }
  65.  
  66. dependencies {
  67.     compile fileTree(dir: 'libs', include: ['*.jar'])
  68.     compile 'com.android.support:appcompat-v7:25.1.1'
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement