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

JPMS compatibility #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
30 changes: 13 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
buildscript {
ext {
uptodateVersion = "1.6.2"
}

repositories {
mavenLocal()
jcenter()
Expand All @@ -14,20 +10,20 @@ buildscript {

dependencies {
classpath "com.ofg:uptodate-gradle-plugin:1.6.3"
classpath "net.ltgt.gradle:gradle-apt-plugin:0.15"
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.6.2"
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.10.0"
classpath "gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.9.9"
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.24.2"
classpath "org.javamodularity:moduleplugin:1.6.0"
}

wrapper {
gradleVersion = "4.6"
gradleVersion = "5.6.2"
}

}

apply plugin: "net.ltgt.apt"
apply plugin: "java"
apply plugin: "org.javamodularity.moduleplugin"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "com.ofg.uptodate"
Expand All @@ -42,7 +38,7 @@ defaultTasks 'build'

ext {
isSnapshot = true
d4jFJBaseVersion = "0.2"
d4jFJBaseVersion = "0.3"

snapshotAppendix = "-SNAPSHOT"
d4jFJVersion = d4jFJBaseVersion + (isSnapshot ? snapshotAppendix : "")
Expand All @@ -58,7 +54,7 @@ ext {

primaryEmail = "[email protected]"

dependencyAutoService = "com.google.auto.service:auto-service:1.0-rc4"
dependencyAutoService = "com.google.auto.service:auto-service:1.0-rc6"
}

repositories {
Expand All @@ -68,26 +64,26 @@ repositories {
}

dependencies {
compileOnly "org.derive4j:derive4j-processor-api:0.12.4"
compileOnly "org.derive4j:derive4j-processor-api:1.2.0"
compileOnly dependencyAutoService
apt dependencyAutoService
annotationProcessor dependencyAutoService
}


archivesBaseName = projectName
version = d4jFJVersion
group = "org.derive4j"

sourceCompatibility = "1.8"
sourceCompatibility = "9"

task javadocJar(type: Jar, dependsOn: "javadoc") {
classifier = 'javadoc'
archiveClassifier = 'javadoc'
from "build/docs/javadoc"
}

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier = 'sources'
}

tasks.withType(JavaCompile) {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Sun Mar 18 15:59:40 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
28 changes: 22 additions & 6 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# 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
#
# https://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.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,16 +44,16 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down Expand Up @@ -155,7 +171,7 @@ if $cygwin ; then
fi

# Escape application args
save ( ) {
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
Expand Down
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
27 changes: 27 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2017, Jean-Baptiste Giraudeau <[email protected]>
*
* This file is part of "Derive4J - Functional Java".
*
* "Derive4J - Functional Java" is free software: you can redistribute it
* and/or modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* "Derive4J - Functional Java" is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with "Derive4J - Functional Java". If not, see <http://www.gnu.org/licenses/>.
*/
module derive4j.fj {
requires static auto.service.annotations;
requires derive4j.processor.api;
requires java.compiler;
requires com.squareup.javapoet;

provides org.derive4j.processor.api.DerivatorFactory
with org.derive4j.processor.fj.FunctionalJavaTypeClassesDerivations;
}