generated from Maxxum69/riru-gradle-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
126 lines (111 loc) · 3.16 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
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
}
}
apply plugin: 'java-gradle-plugin'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
group 'com.github.kr328'
version '1.0-alpha08'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
}
gradlePlugin {
plugins {
ndkPlugin {
id = 'rirutools.ndk'
implementationClass = 'com.github.kr328.rirutools.NdkPlugin'
}
dexPlugin {
id = "rirutools.dex"
implementationClass = 'com.github.kr328.rirutools.DexPlugin'
}
magiskPlugin {
id = "rirutools.magisk"
implementationClass = 'com.github.kr328.rirutools.MagiskPlugin'
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
pkg {
repo = project.name
name = project.name
desc = 'Gradle plugin for riru modules build'
websiteUrl = 'https://github.com/Kr328/riru-gradle-tools'
issueTrackerUrl = 'https://github.com/Kr328/riru-gradle-tools/issues'
vcsUrl = 'https://github.com/Kr328/riru-gradle-tools.git'
licenses = ['MIT']
labels = ['riru']
publicDownloadNumbers = true
githubRepo = 'Kr328/riru-gradle-tools'
githubReleaseNotesFile = 'README.md'
version {
name = project.version
desc = project.version
released = new Date()
}
}
publications = ['rirutools']
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
// Create the pom configuration:
def pomConfig = {
licenses {
license {
name "The MIT License"
url "https://opensource.org/licenses/MIT"
distribution "repo"
}
}
developers {
developer {
id "kr328"
name "Kr328"
email "[email protected]"
}
}
scm {
url "https://github.com/Kr328/riru-gradle-tools"
}
}
// Create the publication with the pom configuration:
publishing {
publications {
rirutools(MavenPublication) {
from components.java
artifact sourcesJar
groupId = project.group
artifactId = project.name
version = project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'Gradle plugins for riru module build')
root.appendNode('name', 'Riru Gradle Plugins')
root.appendNode('url', 'https://github.com/Kr328/riru-gradle-tools')
root.children().last() + pomConfig
}
}
}
// For local test
repositories {
maven {
url = "$buildDir/repo"
}
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
}