-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
75 lines (66 loc) · 2.2 KB
/
build.gradle.kts
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
import org.apache.tools.ant.taskdefs.condition.Os
import org.jreleaser.model.Active
plugins {
base
alias(libs.plugins.jreleaser)
}
task("addGitHooks") {
onlyIf("unix") {
!Os.isFamily(Os.FAMILY_WINDOWS)
}
exec {
commandLine("ln", "-s", "-f", "../../git-hooks/pre-push", ".git/hooks/pre-push")
commandLine("ln", "-s", "-f", "../../git-hooks/pre-commit", ".git/hooks/pre-commit")
}
println("Git hooks added")
}
val smithyJavaVersion = project.file("VERSION").readText().replace(System.lineSeparator(), "")
allprojects {
group = "software.amazon.smithy.java"
version = smithyJavaVersion
}
println("Smithy-Java version: '${smithyJavaVersion}'")
/*
* Jreleaser (https://jreleaser.org) config.
*/
jreleaser {
dryrun = false
// Used for creating a tagged release, uploading files and generating changelog.
// In the future we can set this up to push release tags to GitHub, but for now it's
// set up to do nothing.
// https://jreleaser.org/guide/latest/reference/release/index.html
release {
generic {
enabled = true
skipRelease = true
}
}
// Used to announce a release to configured announcers.
// https://jreleaser.org/guide/latest/reference/announce/index.html
announce {
active = Active.NEVER
}
// Signing configuration.
// https://jreleaser.org/guide/latest/reference/signing.html
signing {
active = Active.ALWAYS
armored = true
}
// Configuration for deploying to Maven Central.
// https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_gradle
deploy {
maven {
nexus2 {
create("maven-central") {
active = Active.ALWAYS
url = "https://aws.oss.sonatype.org/service/local"
snapshotUrl = "https://aws.oss.sonatype.org/content/repositories/snapshots"
closeRepository.set(true)
releaseRepository.set(true)
verifyPom.set(true)
stagingRepository(rootProject.layout.buildDirectory.dir("staging").get().asFile.path)
}
}
}
}
}