This repository has been archived by the owner on Sep 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
96 lines (79 loc) · 2.43 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
plugins {
id 'jacoco'
id 'java-library'
id 'java-library-distribution'
id("de.jjohannes.extra-java-module-info") version "0.1"
}
extraJavaModuleInfo {
module("commons-logging-1.2.jar", "commons.logging", "1.2") {}
module("javax.servlet-api-3.1.0.jar", "javax.servlet.api", "3.1.0") {
exports "javax.servlet.http"
exports "javax.servlet"
}
module("jsoup-1.12.1.jar", "org.jsoup", "1.12.1") {
exports "org.jsoup"
exports "org.jsoup.nodes"
exports "org.jsoup.select"
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation project(':scraper-nodes-dev')
implementation project(':scraper-nodes-erlang')
implementation project(':scraper-nodes-server')
implementation project(':scraper-nodes-unstable')
implementation project(':scraper-nodes-experimental')
}
plugins.withType(JavaPlugin).configureEach {
java {
modularity.inferModulePath = true
}
}
subprojects {
configurations {
providedCompile
}
afterEvaluate {
dependencies {
providedCompile 'com.github.scraperflow.scraper:api:v0.17.3'
testImplementation 'com.github.scraperflow.scraper:core:v0.17.3'
testImplementation 'com.github.scraperflow.scraper:core-plugins:v0.17.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.6.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
compileJava {
sourceSets.main.compileClasspath += configurations.providedCompile
}
}
group = 'org.scraper'
plugins.withType(JavaPlugin).configureEach {
java {
modularity.inferModulePath = true
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
}
// merge coverage
apply from: 'gradle/jacoco-merge.gradle'
// local install
task installLocal(type: Copy) {
def homePath = System.properties['user.home']
from("${buildDir}/install/scraper-nodes/lib")
into("${homePath}/opt/lib/scraper/var")
include('*.jar')
}
installLocal.dependsOn(installDist);
task distribute(type: Zip) {
archiveFileName = "bundle.zip"
destinationDirectory = file("$buildDir/dist")
from "$buildDir/install/scraper-nodes/lib"
}
distribute.dependsOn(installDist);