This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
87 lines (75 loc) · 2.22 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
plugins {
id 'java'
id 'maven-publish'
}
group 'com.danifoldi'
version '0.7.1'
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
repositories {
mavenCentral()
google()
maven { url 'https://repo.danifoldi.com/repository/maven-releases/' }
}
dependencies {
// internal libraries
implementation 'com.danifoldi:microbase:0.7.1'
// typetoken
implementation ('com.google.guava:guava:31.1-jre') {
exclude module: 'gson'
exclude module: 'error_prone_annotations'
exclude module: 'jsr305'
exclude module: 'failureaccess'
exclude module: 'listenablefuture'
exclude module: 'j2objc-annotations'
exclude module: 'checker-qual'
}
// intellij
compileOnly 'org.jetbrains:annotations:23.1.0'
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.java.srcDirs
}
artifacts {
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'DataVerse'
from components.java
artifact sourcesJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'DataVerse'
description = 'A database engine supporting many platforms'
url = 'https://github.com/DaniFoldi/DataVerse'
}
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.default.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots')
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}