-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
91 lines (83 loc) · 2.46 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Gradle plugin project to get you started.
* For more details take a look at the Writing Custom Plugins chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.1.1/userguide/custom_plugins.html
*/
plugins {
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
id "com.gradle.plugin-publish" version "0.10.1"
id 'java-gradle-plugin'
//id 'maven-publish'
id 'eclipse'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// Use JUnit test framework for unit tests
testImplementation 'junit:junit:4.12'
}
group = 'com.github.langmo'
version = '0.1.0'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
apply plugin: 'java'
jar.archiveName = "${rootProject.name}.${jar.extension}"
jar.doFirst{
manifest{
def manif = "${projectDir}/src/main/resources/META-INF/MANIFEST.MF"
if (new File(manif).exists()) {
from file(manif)
}
else
{
attributes(
'Class-Path' : configurations.compile.collect { it.getName() }.join(' ')
)
}
attributes(
'Build-Timestamp': new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date()),
'Build-Version' : rootProject.version,
'Created-By' : "Gradle ${gradle.gradleVersion}",
'Build-Jdk' : "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS' : "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}"
)
}
}
/*
publishing {
publications {
gradlensis(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = 'mavenRepo'
url = "file://${buildDir}/repo"
}
}
}*/
gradlePlugin {
plugins {
gradleNsisPlugin {
id = 'com.github.langmo.gradlensis'
implementationClass = 'com.github.langmo.gradlensis.GradleNsisPlugin'
}
}
}
pluginBundle {
website = 'https://github.com/langmo/gradle-nsis'
vcsUrl = 'https://github.com/langmo/gradle-nsis'
description = 'Creates NSIS installers for Windows.'
tags = ['NSIS', 'installer', 'windows', 'distribution']
plugins {
gradleNsisPlugin {
displayName = 'NSIS installer plugin'
}
}
}