-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
140 lines (108 loc) · 4.72 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
* DexPatcher - Copyright 2015-2020 Rodrigo Balerdi
* (GNU General Public License version 3 or later)
*
* DexPatcher is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*/
plugins {
id 'groovy'
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '0.12.0'
}
group = 'io.github.dexpatcher.dexpatcher-gradle'
version = '2.1.0'
ext.mainArtifact = 'dexpatcher-gradle'
ext.artifactName = 'DexPatcher-gradle'
repositories {
jcenter()
google()
}
dependencies {
implementation localGroovy()
compileOnly 'com.android.tools.build:gradle:3.4.0'
}
compileGroovy {
options.compilerArgs << '-proc:none'
}
apply from: 'configure-artifacts.gradle'
afterEvaluate {
def archivesArtifacts = configurations.archives.artifacts
archivesArtifacts.removeAll archivesArtifacts.findAll { it.classifier in ['javadoc', 'groovydoc'] }
}
gradlePlugin {
def idPrefix = 'io.github.dexpatcher.'
def classPrefix = 'lanchon.dexpatcher.gradle.plugins.'
plugins {
basePlugin {
id = idPrefix + 'base'
implementationClass = classPrefix + 'DexpatcherBasePlugin'
}
apkLibraryPlugin {
id = idPrefix + 'apk-library'
implementationClass = classPrefix + 'ApkLibraryPlugin'
}
patchedAppPlugin {
id = idPrefix + 'patched-application'
implementationClass = classPrefix + 'PatchedAppPlugin'
}
patchLibraryPlugin {
id = idPrefix + 'patch-library'
implementationClass = classPrefix + 'PatchLibraryPlugin'
}
}
}
pluginBundle {
def descriptionPrefix = 'DexPatcher is a toolchain for modifying Android applications at source-level using Java ' +
'and the full power of Android Studio. '
def descriptionSuffix = 'DexPatcher is free software. (GPLv3+)'
website = 'https://dexpatcher.github.io/'
vcsUrl = 'https://github.com/DexPatcher/DexPatcher-gradle'
description = descriptionPrefix + descriptionSuffix
tags = ['dexpatcher', 'apktool', 'dex2jar', 'patch', 'modify', 'mod', 'reverse', 'engineer', 'reengineer',
'android', 'application', 'apk', 'dalvik', 'bytecode']
plugins {
basePlugin {
displayName = 'DexPatcher Base'
description = descriptionPrefix +
'The DexPatcher Base plugin provides basic DexPatcher, Apktool and dex2jar tasks. ' +
descriptionSuffix
}
apkLibraryPlugin {
displayName = 'DexPatcher APK Library'
description = descriptionPrefix +
'The DexPatcher APK Library plugin processes a source application provided as an Android APK ' +
'and produces a DexPatcher APK library. The library is used to create modified versions of the ' +
'source application and includes its Dalvik bytecode and decoded manifest and resources. ' +
descriptionSuffix
}
patchedAppPlugin {
displayName = 'DexPatcher Patched Application'
description = descriptionPrefix +
'The DexPatcher Patched Application plugin produces a modified Android application by applying ' +
'changes to code, manifest and resources of a source application provided as an Android APK or ' +
'a DexPatcher APK library. ' +
descriptionSuffix
}
patchLibraryPlugin {
displayName = 'DexPatcher Patch Library'
description = descriptionPrefix +
'The DexPatcher Patch Library plugin produces a DexPatcher patch library that bundles compiled ' +
'changes to code, manifest and resources of a source application without bundling any part of ' +
'the application itself. The source application is provided as an Android APK or a DexPatcher ' +
'APK library. DexPatcher patch libraries are similar in structure to Android libraries (AAR ' +
'files). The changes bundled in a patch library are applied to its source application using the ' +
'DexPatcher Patched Application plugin. Several patch libraries can be applied in the same step ' +
'or their application can be serialized and chained. ' +
descriptionSuffix
}
}
mavenCoordinates {
groupId = group
artifactId = mainArtifact
}
}
apply from: 'check-copyright.gradle'
wrapper.distributionType = Wrapper.DistributionType.ALL