Всё есть bundles
Всё же лучше вернуться к изначальной идее, когда модули и юиюлиотеки подгружаются как bundles, т.к. на данном этапе ясно, что разные модули могут использовать одни и теже бибилиотеки.
This commit is contained in:
@@ -1,10 +1,15 @@
|
|||||||
group = 'asys'
|
group = 'asys'
|
||||||
version = '0.1.1-SNAPSHOT'
|
version = '0.2-SNAPSHOT'
|
||||||
|
|
||||||
apply plugin: 'application'
|
apply plugin: 'application'
|
||||||
|
|
||||||
mainClassName = "asys.core.Main"
|
mainClassName = "asys.core.Main"
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
included
|
||||||
|
compile.extendsFrom included
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Implementation-Title': 'ASys Core',
|
attributes 'Implementation-Title': 'ASys Core',
|
||||||
@@ -12,12 +17,13 @@ jar {
|
|||||||
'Main-Class': mainClassName
|
'Main-Class': mainClassName
|
||||||
}
|
}
|
||||||
baseName = project.group + '.' + project.name
|
baseName = project.group + '.' + project.name
|
||||||
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.included.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
included group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
|
||||||
runtime group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion
|
runtime group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion
|
||||||
|
|
||||||
compile group: 'org.apache.felix', name: 'org.apache.felix.framework', version: '5.6.1'
|
included group: 'org.apache.felix', name: 'org.apache.felix.framework', version: '5.6.1'
|
||||||
compile group: 'com.google.guava', name: 'guava', version: '21.0'
|
compile group: 'com.google.guava', name: 'guava', version: '21.0'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,10 +63,11 @@ public class Core {
|
|||||||
private String extraPackages() {
|
private String extraPackages() {
|
||||||
StringJoiner sj = new StringJoiner(",");
|
StringJoiner sj = new StringJoiner(",");
|
||||||
sj.add("com.sun.net.httpserver");
|
sj.add("com.sun.net.httpserver");
|
||||||
|
sj.add("sun.misc");
|
||||||
|
sj.add("sun.nio.ch");
|
||||||
sj.add("asys.api");
|
sj.add("asys.api");
|
||||||
sj.add("org.slf4j;version=1.7.21");
|
sj.add("org.slf4j;version=1.7.21");
|
||||||
sj.add("org.slf4j.helpers;version=1.7.21");
|
sj.add("org.slf4j.helpers;version=1.7.21");
|
||||||
sj.add("com.google.common.collect;version=21.0");
|
|
||||||
return sj.toString();
|
return sj.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,13 @@
|
|||||||
group = 'asys'
|
group = 'asys'
|
||||||
version = '0.4-SNAPSHOT'
|
version = '0.5-SNAPSHOT'
|
||||||
|
|
||||||
apply plugin: 'osgi'
|
apply plugin: 'osgi'
|
||||||
|
|
||||||
configurations {
|
|
||||||
included
|
|
||||||
compile.extendsFrom included
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
dependsOn configurations.included
|
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
name = 'ASys MC server manager'
|
name = 'ASys MC server manager'
|
||||||
instruction 'Bundle-Activator', 'asys.mcsmanager.Activator'
|
instruction 'Bundle-Activator', 'asys.mcsmanager.Activator'
|
||||||
instruction 'Import-Package', '!io.netty.*', 'javax.security.cert', 'org.slf4j.helpers', '*'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
from { configurations.included.collect { it.isDirectory() ? it : zipTree(it).matching{exclude{it.path.contains('META-INF')} } } }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
@@ -27,5 +17,5 @@ ext {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
compile project(':webinterface')
|
compile project(':webinterface')
|
||||||
included group: 'io.netty', name: 'netty-codec', version: nettyVersion
|
compile group: 'io.netty', name: 'netty-codec', version: nettyVersion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
group = 'asys'
|
group = 'asys'
|
||||||
version = '0.16-SNAPSHOT'
|
version = '0.17-SNAPSHOT'
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
@@ -12,16 +12,6 @@ buildscript {
|
|||||||
|
|
||||||
apply plugin: 'org.dm.bundle'
|
apply plugin: 'org.dm.bundle'
|
||||||
|
|
||||||
configurations {
|
|
||||||
included
|
|
||||||
compile.extendsFrom included
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
dependsOn configurations.included
|
|
||||||
from { configurations.included.collect { it.isDirectory() ? it : zipTree(it).matching{exclude{it.path.contains('META-INF')} } } }
|
|
||||||
}
|
|
||||||
|
|
||||||
bundle {
|
bundle {
|
||||||
instructions << [
|
instructions << [
|
||||||
'Bundle-Name': 'ASys Web interface',
|
'Bundle-Name': 'ASys Web interface',
|
||||||
@@ -35,6 +25,6 @@ bundle {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
included group: 'com.google.code.gson', name: 'gson', version: '2.7'
|
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
|
||||||
included group: 'commons-io', name: 'commons-io', version: '2.5'
|
compile group: 'commons-io', name: 'commons-io', version: '2.5'
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user