This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 182
/
build.gradle
71 lines (59 loc) · 2.13 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:5.14.2"
classpath "com.github.jxnu-liguobin:leetcode-helper:0.1.4"
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'com.github.jxnu-liguobin.leetcode-helper'
group = 'io.github.dreamylost'
version = '2.0.1'
description = "Recording Learning, Work, Interview, Summary and Reflection"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenLocal()
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
// 先从url中下载jar若没有找到,则在artifactUrls中寻找
maven {
url "https://maven.aliyun.com/nexus/content/groups/public/"
artifactUrls "https://central.maven.org/maven2/"
}
maven {
name "spring"
url "https://repo.spring.io/libs-milestone/"
}
google()
mavenCentral()
}
dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9'
}
build.dependsOn 'spotlessCheck'
[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
//使用: gradle scala-leetcode:leetcodeCodegenService -Pq=top-k-frequent-elements
//参数说明:gradle任务必须指定模块,否则会每个子模块都执行一次。
task leetcodeCodegenService(type: com.github.dreamylost.task.LeetcodeGradleTask) {
questionTitle = rootProject.getProperties().get("q").toString()
generatedLanguage = com.github.dreamylost.GeneratedLanguage.Scala
String s = rootProject.getProperties().get("p").toString()
packageName = s == null ? "io.github.dreamylost" : s
prefix = "Leetcode_"
serverConfig = com.github.dreamylost.invoker.ServerConfig.defaultConfig()
}
}
allprojects {
tasks.withType(JavaCompile).configureEach {
options.fork = true
}
}