-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
62 lines (51 loc) · 1.49 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
plugins {
id 'java'
id 'groovy'
id 'maven'
id 'com.gradle.plugin-publish' version '0.12.0'
}
group 'io.invertase.gradle'
version = System.getenv('PLUGIN_VERSION') ?: '1.4'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
compile localGroovy()
testCompile group: 'junit', name: 'junit', version: '4.12'
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: uri('repo'))
}
}
}
pluginBundle {
website = 'https://github.com/invertase/react-native-gradle-plugin'
vcsUrl = 'https://github.com/invertase/react-native-gradle-plugin'
description = 'React Native Plugin'
tags = ['react-native', 'react', 'firebase', 'invertase']
plugins {
reactNativeBuildPlugin {
id = 'io.invertase.gradle.build'
displayName = 'React Native Build Plugin'
}
reactNativeSettingsPlugin {
id = 'io.invertase.gradle.settings'
displayName = 'React Native Settings Plugin'
}
}
}
task setupPluginUpload << {
def key = System.getenv('GRADLE_PUBLISH_KEY')
def secret = System.getenv('GRADLE_PUBLISH_SECRET')
if (!key || !secret) {
throw new RuntimeException("GRADLE_PUBLISH_KEY and/or GRADLE_PUBLISH_SECRET are not defined environment variables")
}
System.properties.setProperty("gradle.publish.key", key)
System.properties.setProperty("gradle.publish.secret", secret)
}
tasks.publishPlugins.dependsOn tasks.setupPluginUpload