This repository has been archived by the owner on Aug 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
82 lines (55 loc) · 1.74 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
buildscript{
if (System.getenv("SONATYPE_USERNAME") != null){
ext."sonatypeUsername" = System.getenv("SONATYPE_USERNAME")
ext."sonatypePassword" = System.getenv("SONATYPE_PASSWORD")
}
if(project.findProperty("sonatypeUsername") == null){
ext.sonatypeUsername = ""
ext.sonatypePassword = ""
}
}
allprojects {
buildscript {
ext.kotlin_version = '1.3.31'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
classpath 'com.squareup:javapoet:1.11.1'
classpath 'de.undercouch:gradle-download-task:3.4.3'
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
}
}
repositories {
mavenCentral()
jcenter()
}
apply plugin: 'signing'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
apply plugin: 'java-library'
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.allTasks.any { it instanceof Sign }) {
// Use Java's console to read from the console (no good for
// a CI environment)
if(System.getenv('GPG_KEY_ID') != null){
def id = System.getenv('GPG_KEY_ID')
def file = "../secring.gpg"
def password = System.getenv('GPG_KEY_PASSPHRASE')
allprojects {
ext."signing.keyId" = id
ext."signing.secretKeyRingFile" = file
ext."signing.password" = password
ext.sonatypeUsername = System.getenv("SONATYPE_USERNAME")
ext.sonatypePassword = System.getenv("SONATYPE_PASSWORD")
}
}
}
}
}
apply plugin: 'signing'
group 'io.arcblock.forge'
version project.file("version").readLines().first()