• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import org.gradle.plugins.ide.eclipse.model.Library
2
3group 'com.softmotions.ejdb2'
4version '1.0'
5
6apply plugin: 'com.android.library'
7//apply plugin: "com.greensopinion.gradle-android-eclipse"
8//apply plugin: 'eclipse'
9
10sourceCompatibility = 1.8
11
12ext {
13
14  flutterRoot = {
15    def flutterProperties = new Properties()
16    def flutterPropertiesFile = rootProject.file('local.properties')
17    if (!flutterPropertiesFile.exists()) {
18        throw new GradleException("Flutter properties file not found. Define a flutter.properties file in your project root.")
19    }
20    flutterPropertiesFile.withInputStream { stream ->
21        flutterProperties.load(stream)
22    }
23    def flutterRoot = flutterProperties.getProperty('flutter.sdk')
24    if (flutterRoot == null) {
25        throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the flutter.properties file.")
26    }
27    return flutterRoot
28  }()
29
30  androidHome = {
31    if (System.env.ANDROID_HOME == null) {
32      throw new GradleException("Missing required ANDROID_HOME env variable");
33    }
34    return System.env.ANDROID_HOME;
35  }()
36}
37
38
39buildscript {
40    repositories {
41        google()
42        jcenter()
43        maven {
44          url "https://plugins.gradle.org/m2/"
45        }
46    }
47
48    dependencies {
49        classpath 'com.android.tools.build:gradle:3.2.1'
50        //classpath "gradle.plugin.com.greensopinion.gradle-android-eclipse:gradle-android-eclipse:1.1"
51    }
52}
53
54rootProject.allprojects {
55    repositories {
56        google()
57        jcenter()
58    }
59}
60
61android {
62    compileSdkVersion 28
63    defaultConfig {
64        minSdkVersion 16
65        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
66    }
67    compileOptions {
68      sourceCompatibility JavaVersion.VERSION_1_8
69      targetCompatibility JavaVersion.VERSION_1_8
70    }
71    lintOptions {
72        disable 'InvalidPackage'
73    }
74}
75
76dependencies {
77  compile fileTree(dir: 'src/main/jniLibs', include: ['*.jar'])
78}
79
80// eclipse {
81//   classpath {
82//     plusConfigurations += [ configurations.compile, configurations.testCompile ]
83//     downloadSources = true
84//     file {
85//       whenMerged {
86//         def androidHome = project.ext.get('androidHome')
87//         def libAndroid = new Library(fileReference(file("$System.env.ANDROID_HOME/platforms/$project.android.compileSdkVersion/android.jar")));
88//         libAndroid.setSourcePath(fileReference(file("$System.env.ANDROID_HOME/sources/$project.android.compileSdkVersion")));
89//         // def flutterRoot = project.ext.get('flutterRoot')
90//         // def flutterLib = new Library(fileReference(file("$flutterRoot/bin/cache/artifacts/engine/android-x86/flutter.jar")))
91//         // flutterLib.setSourcePath(fileReference(file('/home/adam/Projects/tmp/engine/shell/platform/android')))
92//         // entries += [ libAndroid, flutterLib ]
93//         entries += [ libAndroid ]
94//       }
95//     }
96//   }
97// }
98