Skip to content

Commit

Permalink
Merge pull request #84 from derive4j/array-gadt-tc-resolution
Browse files Browse the repository at this point in the history
gadt TC resolution + improved array support + formatting
  • Loading branch information
jbgi committed Mar 17, 2018
2 parents 2136256 + db3bc43 commit dedfe22
Show file tree
Hide file tree
Showing 80 changed files with 2,320 additions and 1,667 deletions.
2 changes: 1 addition & 1 deletion annotation/build.gradle
Expand Up @@ -5,7 +5,7 @@ archivesBaseName = "${project.projectName}-${project.name}"

dependencies {
testCompile dependencyJunit
apt dependencyPreviousDerive4J
annotationProcessor dependencyPreviousDerive4J
}

configureUpload(lgplLicenseName)
315 changes: 315 additions & 0 deletions annotation/etc/eclipse-format.xml

Large diffs are not rendered by default.

11 changes: 2 additions & 9 deletions annotation/src/main/java/org/derive4j/Derive.java
Expand Up @@ -41,15 +41,8 @@

Visibility withVisibility() default Same;

Make[] make() default { lambdaVisitor,
constructors,
getters,
modifiers,
lazyConstructor,
caseOfMatching,
casesMatching,
catamorphism,
hktCoerce };
Make[] make() default { lambdaVisitor, constructors, getters, modifiers, lazyConstructor, caseOfMatching,
casesMatching, catamorphism, hktCoerce };

Instances[] value() default {};

Expand Down
5 changes: 3 additions & 2 deletions annotation/src/main/java/org/derive4j/ExportAsPublic.java
Expand Up @@ -22,8 +22,9 @@
import java.lang.annotation.Target;

/**
* Annotate package private static methods of your @Data class with this annotation to have them re-exported as public the the
* corresponding generated class.
* Annotate package private static methods of your @Data class with this
* annotation to have them re-exported as public the the corresponding generated
* class.
*/
@Target(ElementType.METHOD)
public @interface ExportAsPublic {
Expand Down
2 changes: 0 additions & 2 deletions annotation/src/main/java/org/derive4j/Instances.java
Expand Up @@ -20,8 +20,6 @@

import java.lang.annotation.Target;

import static org.derive4j.Visibility.Same;

@Target({})
public @interface Instances {

Expand Down
41 changes: 25 additions & 16 deletions build.gradle
Expand Up @@ -5,9 +5,6 @@ ext {
}

buildscript {
ext {
uptodateVersion = "1.6.2"
}

repositories {
mavenLocal()
Expand All @@ -19,20 +16,21 @@ buildscript {
}

dependencies {
classpath "com.ofg:uptodate-gradle-plugin:$uptodateVersion"
classpath "net.ltgt.gradle:gradle-apt-plugin:0.9"
classpath "nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.0"
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"
}

wrapper {
gradleVersion = "3.5"
gradleVersion = "4.6"
}
}

allprojects {

apply plugin: 'com.jfrog.artifactory-upload'
apply plugin: 'com.jfrog.artifactory'
apply plugin: "idea"
apply plugin: 'jacoco'

Expand All @@ -56,10 +54,10 @@ allprojects {

primaryEmail = "jb@giraudeau.info"

dependencyJavaPoet = "com.squareup:javapoet:1.8.0"
dependencyPreviousDerive4J = "org.derive4j:derive4j:0.12.1"
dependencyJavaPoet = "com.squareup:javapoet:1.10.0"
dependencyPreviousDerive4J = "org.derive4j:derive4j:0.12.3"
dependencyJunit = "junit:junit:4.12"
dependencyAutoService = "com.google.auto.service:auto-service:1.0-rc2"
dependencyAutoService = "com.google.auto.service:auto-service:1.0-rc4"

gplLicenseName = "The GNU General Public License"
lgplLicenseName = "The GNU Lesser General Public License"
Expand Down Expand Up @@ -92,6 +90,17 @@ subprojects {
apply plugin: "com.ofg.uptodate"
apply plugin: "license"
apply plugin: "com.jfrog.artifactory"
apply plugin: "com.diffplug.gradle.spotless"

spotless {
java {
eclipse("4.7.2").configFile "$rootDir/etc/eclipse-format.xml"
indentWithSpaces(2)
trimTrailingWhitespace()
removeUnusedImports()
endWithNewline()
}
}

repositories {
mavenLocal()
Expand All @@ -101,7 +110,7 @@ subprojects {

if (displayCompilerWarnings) {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all"
options.compilerArgs += ["-Xlint:all"]
}
}

Expand Down Expand Up @@ -161,7 +170,7 @@ configure(subprojects) {
}

// Output MANIFEST.MF statically so eclipse can see it for plugin development
task eclipsePluginManifest(dependsOn: jar) << {
task eclipsePluginManifest(dependsOn: jar) doLast {
file("META-INF").mkdirs()
jar.manifest.writeTo(file("META-INF/MANIFEST.MF"))
}
Expand All @@ -182,7 +191,7 @@ task codeCoverageReport(type: JacocoReport) {

reports {
xml.enabled true
xml.destination "${buildDir}/reports/jacoco/report.xml"
xml.destination new File("${buildDir}/reports/jacoco/report.xml")
html.enabled false
csv.enabled false
}
Expand Down Expand Up @@ -217,6 +226,6 @@ artifactory {
}
}

task env << {
task env doLast {
println System.getenv()
}
227 changes: 0 additions & 227 deletions etc/derive4j-idea-code-style.xml

This file was deleted.

0 comments on commit dedfe22

Please sign in to comment.