-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
73 lines (64 loc) · 2.17 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
plugins {
id "com.gradle.plugin-publish" version "0.21.0"
}
apply plugin: 'java-library'
apply plugin: 'maven'
group 'de.inetsoftware'
archivesBaseName = 'jwebassembly-gradle'
version = '0.4'
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
dependencies {
compile gradleApi()
}
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'src'
}
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: uri('../repo'))
}
}
}
// add the source codes for Eclipse for gradleApi(). You need to use a gradle distribution with "-all" like https://services.gradle.org/distributions/gradle-4.3-all.zip
apply plugin: 'eclipse'
import org.gradle.plugins.ide.eclipse.model.*
eclipse {
classpath {
file {
whenMerged {Classpath cp ->
String gradleHome = gradle.getGradleHomeDir().absolutePath.replace(File.separator, '/')
String gradleSrc = "${gradleHome}/src"
cp.entries.each {ClasspathEntry entry ->
if ((entry in AbstractLibrary) && (entry.library.file.name.startsWith('gradle-'))) {
entry.sourcePath = new org.gradle.plugins.ide.eclipse.model.internal.FileReferenceFactory().fromPath(gradleSrc)
}
}
}
}
}
}
pluginBundle {
website = 'https://github.com/i-net-software/JWebAssembly-Gradle'
vcsUrl = 'https://github.com/i-net-software/JWebAssembly-Gradle'
description = 'A Gradle plugin for the JWebAssembly compiler. A Java bytecode to WebAssembly converter. It produce the WASM and JavaScript file from your *.java, *.class and/or *.jar files.'
tags = ['jwebassembly', 'webassembly', 'wasm', 'java', 'bytecode', 'compile', 'converter', 'transpiler' ]
plugins {
jwebassemblerPlugin {
id = 'de.inetsoftware.jwebassembly'
displayName = 'Gradle JWebAssembly plugin'
tags = ['jwebassembly', 'webassembly', 'wasm', 'java', 'bytecode', 'compile', 'converter', 'transpiler' ]
}
}
mavenCoordinates {
artifactId = archivesBaseName
}
}