Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add module descriptor while keeping workable Eclipse IDE experience #540

Merged
merged 1 commit into from Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion caffeine/build.gradle
Expand Up @@ -24,7 +24,12 @@ idea.module {
}

eclipse.classpath.file.whenMerged {
entries.findAll { it instanceof SourceFolder && it.output == 'bin/codeGen' }*.output = 'bin/main'
entries.findAll {
it instanceof SourceFolder && it.output == 'bin/codeGen'
}*.output = 'bin/main'
// Exclude module-info when compiling through Eclipse
def main = entries.find { it instanceof SourceFolder && it.path == 'src/main/java' }
main.excludes.add('module-info.java')
}

plugins.withType(EclipsePlugin) {
Expand Down
7 changes: 7 additions & 0 deletions caffeine/src/main/java/module-info.java
@@ -0,0 +1,7 @@
module com.github.benmanes.caffeine {
exports com.github.benmanes.caffeine.cache;
exports com.github.benmanes.caffeine.cache.stats;

requires static transitive com.google.errorprone.annotations;
requires static transitive org.checkerframework.checker.qual;
}
1 change: 0 additions & 1 deletion gradle/codeQuality.gradle
Expand Up @@ -148,7 +148,6 @@ tasks.withType(JavaCompile).configureEach {
annotatedPackages.add('com.github.benmanes.caffeine')
}
}
modularity.inferModulePath.set(false)
checkerFramework.skipCheckerFramework = true
}

Expand Down
10 changes: 7 additions & 3 deletions gradle/dependencies.gradle
Expand Up @@ -41,7 +41,7 @@ ext {
elasticSearch: '7.12.0',
expiringMap: '0.5.9',
fastfilter: '1.0',
fastutil: '8.5.4',
fastutil: '8.5.2',
flipTables: '1.1.0',
googleJavaFormat: '1.10.0',
guava: '30.1.1-jre',
Expand Down Expand Up @@ -165,10 +165,14 @@ ext {
jcacheTck: "javax.cache:cache-tests:${testVersions.jcacheTck}",
jcacheTckTests: "javax.cache:cache-tests:${testVersions.jcacheTck}:tests",
jctools: "org.jctools:jctools-core:${testVersions.jctools}",
junit: "junit:junit:${testVersions.junit}",
junit: dependencies.create("junit:junit:${testVersions.junit}") {
exclude group: 'org.hamcrest'
},
mockito: "org.mockito:mockito-core:${testVersions.mockito}",
osgiCompile: [
"org.ops4j.pax.exam:pax-exam-junit4:${testVersions.paxExam}",
dependencies.create("org.ops4j.pax.exam:pax-exam-junit4:${testVersions.paxExam}") {
exclude group: 'org.hamcrest'
},
],
osgiRuntime: [
"org.apache.felix:org.apache.felix.framework:${testVersions.felix}",
Expand Down
4 changes: 4 additions & 0 deletions guava/build.gradle
Expand Up @@ -14,6 +14,10 @@ dependencies {
testImplementation testLibraries.guavaTestLib
}

compileJava {
modularity.inferModulePath = false
}

jar.manifest {
attributes 'Bundle-SymbolicName': 'com.github.ben-manes.caffeine.guava'
attributes 'Import-Package': [
Expand Down
4 changes: 4 additions & 0 deletions jcache/build.gradle
Expand Up @@ -30,6 +30,10 @@ dependencies {
doc "${libraries.jcache}:javadoc"
}

compileJava {
modularity.inferModulePath = false
}

jar.manifest {
attributes 'Bundle-SymbolicName': 'com.github.ben-manes.caffeine.jcache'
attributes 'Import-Package': [
Expand Down
4 changes: 4 additions & 0 deletions simulator/build.gradle
Expand Up @@ -35,6 +35,10 @@ dependencies {
testImplementation testLibraries.testng
}

compileJava {
modularity.inferModulePath = false
}

test {
useTestNG()
}
Expand Down