-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
110 lines (98 loc) · 3.23 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
buildscript {
repositories {
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
gradlePluginPortal()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.5'
}
}
group = projectGroup
version = projectVersion
allprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'application'
apply plugin: 'com.gradleup.shadow'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
application {
mainClassName = projectMainClassName
}
java {
sourceCompatibility = JavaVersion.VERSION_11
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api 'io.netty:netty-transport:4.1.115.Final'
api 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0'
implementation 'ch.qos.logback:logback-classic:1.5.12'
}
kotlin {
compileKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_11
compileTestKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_11
compileJava.options.encoding = 'UTF-8'
}
shadowJar {
archiveBaseName.set(rootProject.name)
archiveClassifier.set('')
archiveVersion.set('')
}
tasks.register('sourcesJar', Jar) {
dependsOn classes
//noinspection GroovyAccessibility //alternatively replace this with archiveClassifier.set('...')
archiveClassifier = 'sources'
from sourceSets.main.allSource, 'build/generated/source/kapt/main', 'build/generated/source/kaptKotlin/main'
}
publishing {
publications {
githubPublish(MavenPublication) {
artifactId projectName
version projectVersion
//from components.java
artifact(sourcesJar)
artifact(jar)
pom {
name = projectName
description = 'Green Tunnel Alternative for JVM Languages'
url = 'https://github.com/alikemalocalan/greentunnel4jvm'
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://mit-license.org/'
distribution = 'repo'
}
}
developers {
developer {
id = 'alikemalocalan'
name = 'Ali Kemal Öcalan'
email = '[email protected]'
roles = ['owner', 'developer']
}
}
scm {
url = 'https://github.com/alikemalocalan/greentunnel4jvm'
connection = 'scm:git:https://github.com/alikemalocalan/greentunnel4jvm.git'
developerConnection = 'scm:git:ssh://[email protected]/alikemalocalan/greentunnel4jvm.git'
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/alikemalocalan/greentunnel4jvm")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}