forked from yltwust/appcan-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (83 loc) · 2.48 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
repositories {
jcenter()
google()
}
apply plugin: 'groovy'
apply plugin: 'maven-publish'
def GROUP_ID='org.appcan.gradle.plugins'
def ARTIFACT_ID='appcan-gradle-plugin'
def VERSION='2.6.0'
Properties properties = new Properties()
InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream() ;
properties.load( inputStream )
def maven_repo_dir = properties.getProperty('maven_repo_dir')
def maven_snapshot_repo_dir = properties.getProperty('maven_snapshot_repo_dir')
afterEvaluate {
publishing {
repositories {
maven {
name = "release"
url = maven_repo_dir
}
maven {
name = "snapshot"
url = maven_snapshot_repo_dir
}
}
publications {
maven(MavenPublication) {
groupId = GROUP_ID
artifactId = ARTIFACT_ID
version = VERSION
from components.java
pom {
name = 'AppCanEnginePackagePlugin'
description = 'A gradle script plugin for packaging of AppCanEngine'
url = 'https://www.appcan.cn'
licenses {
license {
name = 'GNU GENERAL PUBLIC LICENSE Version 3'
}
}
developers {
developer {
id = 'ZYP'
name = 'Yipeng Zhang'
email = 'sandy1108@163.com'
}
}
scm {
url = 'https://github.com/sandy1108/appcan-gradle-plugin'
}
}
}
}
}
}
sourceSets {
main {
groovy {
srcDir 'src/main/groovy'
}
java {
srcDir "src/main/java"
}
// note:若提示appcan.properties重复导致编译失败,可尝试临时注释下面段落,之后再恢复
// resources {
// srcDir 'src/main/resources'
// }
}
}
task clearBuild(type: Delete) {
delete 'build'
}
dependencies {
implementation gradleApi()
implementation localGroovy()
}
dependencies {
implementation 'com.android.tools.build:gradle:7.4.2'
implementation 'com.android.tools:sdk-common:27.1.2'
}
sourceCompatibility = 1.11
targetCompatibility = 1.11