3 Star 16 Fork 1

依赖极速下载/eclipse-rcp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 4.13 KB
一键复制 编辑 原始数据 按行查看 历史
Ned Twigg 提交于 2020-04-12 08:39 +08:00 . Fix compile / implementation stuff for Gradle 6+
buildscript {
repositories {
// make it easy to test a snapshot version of goomph
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
// grab dependencies from the gradle plugin portal
maven { url 'https://plugins.gradle.org/m2/' }
}
// make sure we don't cache stale snapshot versions
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
// a bunch of eclipse stuff
classpath "com.diffplug.gradle:goomph:${VER_GOOMPH}"
// creates a targetplatform
classpath "org.standardout:bnd-platform:${VER_BND_PLATFORM}"
// apply spotless
classpath "com.diffplug.spotless:spotless-plugin-gradle:${VER_SPOTLESS}"
}
}
///////////
// MAVEN //
///////////
repositories {
mavenCentral()
}
apply from: rootProject.file('gradle/spotless/spotless.gradle')
subprojects {
apply from: rootProject.file('gradle/spotless/spotless.gradle')
repositories {
mavenCentral()
// SNAPSHOT versions are free to rely on other SNAPSHOT libraries
if (project.version.endsWith('SNAPSHOT')) {
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
// local eclipse maven (created by Goomph)
maven {
url rootProject.file('target.p2/build/p2asmaven/maven')
metadataSources {
mavenPom()
artifact()
}
}
}
}
/////////////
// PLUGINS //
/////////////
// tasks to clean and jar all of the plugins
Closure IS_PLUGIN = { it.name.startsWith('com.diffplug') }
configure(subprojects.findAll(IS_PLUGIN)) {
// we need the maven repo from p2
evaluationDependsOn(':target.p2')
def PROJECT_NAME = it.name
//////////
// JAVA //
//////////
apply plugin: 'java'
sourceSets {
main { java {
srcDir 'src'
} }
test { java {
srcDir 'test'
} }
}
sourceCompatibility = VER_JAVA
targetCompatibility = VER_JAVA
// add SWT and the appropriate platform-native SWT for building and testing
dependencies {
implementation "eclipse-deps:org.eclipse.swt:+"
implementation "eclipse-deps:org.eclipse.swt.${com.diffplug.common.swt.os.SwtPlatform.getNative()}:+"
}
//////////
// OSGI //
//////////
// create the manifest
apply plugin: 'com.diffplug.osgi.bndmanifest'
osgiBndManifest {
copyTo 'META-INF/MANIFEST.MF'
}
// configure the OSGi bundle
jar.manifest.attributes(
'-exportcontents': 'com.diffplug.*',
'-removeheaders': 'Bnd-LastModified,Bundle-Name,Created-By,Tool,Private-Package,Require-Capability',
'Import-Package': '!javax.annotation.*,*',
'Bundle-SymbolicName': project.name,
'Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8',
'Require-Capability': 'osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"',
'Bundle-Vendor': 'DiffPlug',
'Bundle-License': "http://www.apache.org/licenses/LICENSE-2.0"
)
//////////////////////
// ECLIPSE PROJECTS //
//////////////////////
apply plugin: 'eclipse'
// remove the build folder
apply plugin: 'com.diffplug.eclipse.excludebuildfolder'
// improve the project deps
apply plugin: 'com.diffplug.eclipse.projectdeps'
// handle build.properties correctly
apply plugin: 'com.diffplug.eclipse.buildproperties'
eclipse {
project {
natures 'org.eclipse.pde.PluginNature'
natures 'org.eclipse.jdt.core.javanature'
buildCommand 'org.eclipse.jdt.core.javabuilder'
buildCommand 'org.eclipse.pde.ManifestBuilder'
buildCommand 'org.eclipse.pde.SchemaBuilder'
}
classpath {
downloadSources true
downloadJavadoc true
}
jdt {
sourceCompatibility VER_JAVA
targetCompatibility VER_JAVA
}
}
// always create "fresh" projects
tasks.eclipse.dependsOn(cleanEclipse)
}
/////////////////////////////////////////////////////////
// Root eclipse project for tinkering with build files //
/////////////////////////////////////////////////////////
apply plugin: 'com.diffplug.eclipse.resourcefilters'
eclipseResourceFilters {
exclude().folders().name('com.diffplug.*')
}
/////////////////////////////
// Setup a headless launch //
/////////////////////////////
apply plugin: 'com.diffplug.osgi.equinoxlaunch'
equinoxLaunch {
codegenSetup {
source.addProject(project(':com.diffplug.rcpdemo'))
source.addMaven('com.google.guava:guava:17.0')
source.addMaven('com.google.guava:guava:18.0')
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_addons/eclipse-rcp.git
git@gitee.com:mirrors_addons/eclipse-rcp.git
mirrors_addons
eclipse-rcp
eclipse-rcp
main

搜索帮助