Skip to content

Commit

Permalink
Add full Java module descriptor (#7241)
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray authored Sep 6, 2021
1 parent 476aa5c commit abeab97
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
id("com.github.hierynomus.license") version "0.16.1"
id("biz.aQute.bnd.builder") version "5.3.0"
id("com.vanniktech.maven.publish") version "0.17.0"
id("org.beryx.jar") version "1.2.0"
}

ext {
Expand All @@ -30,6 +31,10 @@ if (releaseTag != null && !releaseTag.isEmpty()) {
logger.lifecycle("Releasing with version: " + project.version)
}

group = "io.reactivex.rxjava3"
version = project.properties["VERSION_NAME"]
description = "RxJava: Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM."

repositories {
mavenCentral()
}
Expand All @@ -52,6 +57,7 @@ java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
ext.javaCompatibility = JavaVersion.VERSION_1_8

tasks.withType(JavaCompile) {
options.compilerArgs << "-parameters"
Expand Down Expand Up @@ -86,17 +92,21 @@ animalsniffer {
}

jar {
// Cover for bnd still not supporting MR Jars: https://github.com/bndtools/bnd/issues/2227
bnd('-fixupmessages': '^Classes found in the wrong directory: \\\\{META-INF/versions/9/module-info\\\\.class=module-info}$')
bnd(
"Bundle-Name": "rxjava",
"Bundle-Vendor": "RxJava Contributors",
"Bundle-Description": "Reactive Extensions for the JVM - a library for composing asynchronous and event-based programs using observable sequences for the Java VM.",
"Import-Package": "!org.junit,!junit.framework,!org.mockito.*,!org.testng.*,*",
"Bundle-DocURL": "https://github.com/ReactiveX/RxJava",
"Eclipse-ExtensibleAPI": "true",
"Automatic-Module-Name": "io.reactivex.rxjava3",
"Export-Package": "!io.reactivex.rxjava3.internal.*, io.reactivex.rxjava3.*",
"Bundle-SymbolicName": "io.reactivex.rxjava3.rxjava"
"Bundle-SymbolicName": "io.reactivex.rxjava3.rxjava",
"Multi-Release": "true"
)

moduleInfoPath = 'src/main/module/module-info.java'
}

license {
Expand Down
30 changes: 30 additions & 0 deletions src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2016-present, RxJava Contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
* the License for the specific language governing permissions and limitations under the License.
*/

module io.reactivex.rxjava3 {
exports io.reactivex.rxjava3.annotations;
exports io.reactivex.rxjava3.core;
exports io.reactivex.rxjava3.disposables;
exports io.reactivex.rxjava3.exceptions;
exports io.reactivex.rxjava3.functions;
exports io.reactivex.rxjava3.observables;
exports io.reactivex.rxjava3.observers;
exports io.reactivex.rxjava3.parallel;
exports io.reactivex.rxjava3.plugins;
exports io.reactivex.rxjava3.processors;
exports io.reactivex.rxjava3.schedulers;
exports io.reactivex.rxjava3.subjects;
exports io.reactivex.rxjava3.subscribers;

requires org.reactivestreams;
}

0 comments on commit abeab97

Please sign in to comment.