-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
51 lines (43 loc) · 1.02 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
/*
* Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
*
* Author: Eddie Hung, AMD
*
* SPDX-License-Identifier: MIT
*
*/
// Specify this is a Java project
plugins {
id 'java-library'
}
dependencies {
api 'com.xilinx.rapidwright:rapidwright:2023.1.4'
}
repositories {
mavenCentral()
}
sourceSets {
main {
// Source code to be taken from the src/ subdirectory
java {
srcDirs = ['src']
}
}
}
task run(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = System.getProperty('main')
}
task fatJar(type: Jar) {
manifest {
attributes "Main-Class": System.getProperty('main', '')
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('.jar') }.collect { zipTree(it) }
}
archiveName System.getProperty('main') + '.jar'
destinationDirectory = rootDir
}