From ac1f0e32ca439c087b253be1f8d991d6b62f2b8b Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 19 Jul 2018 18:46:05 -0700 Subject: [PATCH] Added gradle files for Android project --- .gitignore | 12 ---------- examples/android/app/build.gradle | 38 +++++++++++++++++++++++++++++++ examples/android/build.gradle | 27 ++++++++++++++++++++++ examples/android/settings.gradle | 1 + 4 files changed, 66 insertions(+), 12 deletions(-) create mode 100644 examples/android/app/build.gradle create mode 100644 examples/android/build.gradle create mode 100644 examples/android/settings.gradle diff --git a/.gitignore b/.gitignore index 23c55ef..ab3bf8b 100644 --- a/.gitignore +++ b/.gitignore @@ -47,8 +47,6 @@ obj # Android Studio / Example project configs *.idea -*.gradle -local.properties #built application files *.apk @@ -64,17 +62,7 @@ local.properties bin/ gen/ -# Local configuration file (sdk path, etc) -local.properties - -# Windows thumbnail db -Thumbs.db - -# OSX files -.DS_Store - # Android Studio -*.iml .idea #.idea/workspace.xml - remove # and delete .idea if it better suit your needs. .gradle diff --git a/examples/android/app/build.gradle b/examples/android/app/build.gradle new file mode 100644 index 0000000..b624c7a --- /dev/null +++ b/examples/android/app/build.gradle @@ -0,0 +1,38 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 28 + defaultConfig { + applicationId "com.example.zerotier" + minSdkVersion 21 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + externalNativeBuild { + cmake { + cppFlags "" + } + } + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + externalNativeBuild { + cmake { + path "/Users/joseph/op/zt/neolibzt/CMakeLists.txt" + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:28.0.0-alpha3' + implementation 'com.android.support.constraint:constraint-layout:1.1.2' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' +} \ No newline at end of file diff --git a/examples/android/build.gradle b/examples/android/build.gradle new file mode 100644 index 0000000..43c0708 --- /dev/null +++ b/examples/android/build.gradle @@ -0,0 +1,27 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + + repositories { + google() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:3.1.3' + + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/examples/android/settings.gradle b/examples/android/settings.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/examples/android/settings.gradle @@ -0,0 +1 @@ +include ':app'