Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import java.util.stream.Collectors

group ''
version '0.19.0'

apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'distribution'

sourceCompatibility = 1.8
targetCompatibility = 1.8

mainClassName = 'org.intellimate.izou.Main'

repositories {
mavenCentral()
mavenLocal()
}

dependencies {
compile 'org.intellimate.izou:sdk:[0.5.0,1.0.0]'
compile 'commons-lang:commons-lang:2.+'
testCompile 'org.mockito:mockito-core:1.+'
testCompile group: 'junit', name: 'junit', version: '4.11'
}



def String projectName = ;
def String pluginClass = ;
def String provider = ;
def List<String> dependencies = [];
def String serverId = ;

jar {
baseName = projectName
manifest {
attributes 'Plugin-Class' : pluginClass,
'Plugin-Id' : group + "." + project.name,
'Plugin-Version' : project.version,
'Plugin-Provider' : provider,
'Plugin-Dependencies' : dependencies.stream().collect(Collectors.joining(",")),
'Server-ID': serverId,
'SDK-Version' : project.version,
'Artifact-ID' : project.name
}
}

task plugin(type: Zip) {
baseName = project.name
version = project.version
def allExcluded = [];
doFirst {
def excluded = ["org.intellimate.izou"];
excluded.addAll(dependencies);
def recursiveAdd
recursiveAdd = { dep ->
allExcluded.add("${dep.module.id.name}-${dep.module.id.version}.jar".toString())
dep.children.each { childResolvedDep ->
if(dep in childResolvedDep.getParents() && childResolvedDep.getConfiguration() == 'compile'){
recursiveAdd(childResolvedDep);
}
}
}

configurations.compile.resolvedConfiguration.firstLevelModuleDependencies.each { dep ->
if (excluded.contains(dep.module.id.group)) {
recursiveAdd(dep)
}
}
}
from (configurations.compile) {
into ('lib/')
exclude { allExcluded.contains(it.file.name) }
exclude(allExcluded)
}
from (sourceSets.main.output.classesDir) {
into ('classes/')
}
from (sourceSets.main.resources) {
into ('classes/')
}
from (new File(project.buildDir, 'tmp/jar/')) {
into ('classes/META-INF/')
}
}

plugin.dependsOn jar
Empty file added build.properties
Empty file.
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sun Jun 05 18:02:54 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
164 changes: 164 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading