-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle
81 lines (66 loc) · 2.54 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
group 'ly.img.flutter.photo_editor_sdk'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.7.21'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'ly.img.android.sdk'
IMGLY.configure {
pesdk {
enabled true
}
useInheritanceDependencies true
modules {
include 'ui:core'
include 'backend:config-loader'
}
}
def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "10.9.0"
task checkVersion {
if (imglyConfig.convertToVersionNumber(imglyConfig.getVersion()) < imglyConfig.convertToVersionNumber(MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION)) {
String WRONG_VERSION = "" +
"┌───────────────────────────────────────────────────────────────────────┐\n"+
"│ PhotoEditor SDK update required! │\n"+
"│ Please update the plugin version in your 'android/build.gradle' file. │\n"+
"│ Minimum required dependency: 'ly.img.android.sdk:plugin:${MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION}' │\n"+
"│ Your are currently using: 'ly.img.android.sdk:plugin:${imglyConfig.getVersion()}' │\n"+
"└───────────────────────────────────────────────────────────────────────┘\n"
throw new GradleScriptException(WRONG_VERSION, new IllegalArgumentException(WRONG_VERSION))
}
}
preBuild.dependsOn checkVersion
android {
if (project.android.hasProperty("namespace")) {
namespace 'ly.img.flutter.photo_editor_sdk'
}
compileSdkVersion 34
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 21
}
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
compileOnly "ly.img.android.sdk:serializer:$imglyConfig.version"
compileOnly rootProject.findProject(":imgly_sdk")
}