Skip to content

Commit

Permalink
fix delombok so javadoc can be added again and the project can be pub…
Browse files Browse the repository at this point in the history
…lished to maven central
  • Loading branch information
moaxcp committed Jun 21, 2024
1 parent 4bf8a59 commit 5023734
Show file tree
Hide file tree
Showing 71 changed files with 117 additions and 108 deletions.
2 changes: 2 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ https://www.x.org/releases/X11R7.6/doc/libXtst/recordlib.html

# versions

## 0.18.1

* fixing delombok task so javadoc works again and the project can be published to maven central

## 0.18.0

* Switched to a multimodule project
Expand Down
22 changes: 21 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'org.sonarqube' version '5.0.0.4638'
id 'io.freefair.lombok' version '8.6' apply false
id 'org.unbroken-dome.test-sets' version '4.1.0' apply false
id 'io.freefair.lombok' version '8.6' apply false
}

allprojects {
Expand All @@ -16,6 +16,26 @@ allprojects {
}
}

subprojects {
apply plugin: 'java-library'
apply plugin: 'io.freefair.lombok'

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
withJavadocJar()
}

delombok {
modulePath = classpath
}

dependencies {

}
}

sonar {
properties {
property "sonar.projectKey", "moaxcp_x11-client"
Expand Down
5 changes: 0 additions & 5 deletions examples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
plugins {
id 'java'
id 'io.freefair.lombok'
}

sonar {
skipProject = true
}
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ include 'x11-client'
include 'x11-toolkit'
include 'xephyr-runner'
include 'examples'

8 changes: 0 additions & 8 deletions x11-client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
plugins {
id 'java-library'
id 'org.unbroken-dome.test-sets'
id 'io.freefair.lombok'
id 'maven-publish'
id 'signing'
id 'jacoco'
}

description = 'An x11 client implemented in java'

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}

dependencies {
api project(':x11-keysym')
api project(':x11-protocol:x11-protocol-core')
Expand Down
2 changes: 0 additions & 2 deletions x11-keysym/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
plugins {
id 'java-library'
id 'io.freefair.lombok'
id 'com.github.moaxcp.x11protocol'
id 'maven-publish'
id 'signing'
Expand Down
6 changes: 0 additions & 6 deletions x11-protocol-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ gradlePlugin {
}
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}

repositories {
mavenCentral()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.moaxcp.x11protocol

import com.github.moaxcp.x11protocol.GenerateX11ProtocolTask
import org.gradle.api.Project
import org.gradle.testfixtures.ProjectBuilder
import spock.lang.Specification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.moaxcp.x11protocol.generator

import com.github.moaxcp.x11protocol.generator.Conventions
import com.squareup.javapoet.ClassName
import spock.lang.Specification

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaClass
import com.github.moaxcp.x11protocol.xcbparser.JavaEnumListProperty
import com.github.moaxcp.x11protocol.xcbparser.XUnitListField
import com.squareup.javapoet.ClassName
import com.squareup.javapoet.CodeBlock
import com.squareup.javapoet.ParameterizedTypeName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.xcbparser.JavaEnum
import com.squareup.javapoet.ClassName
import com.squareup.javapoet.TypeSpec
import spock.lang.Specification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaError
import com.github.moaxcp.x11protocol.xcbparser.XTypeError

class JavaErrorSpec extends XmlSpec {
def requestError() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaEvent
import com.github.moaxcp.x11protocol.xcbparser.XTypeEvent

class JavaEventSpec extends XmlSpec {
def keyPress() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaEvent
import com.github.moaxcp.x11protocol.xcbparser.XTypeEvent

class JavaGenericEventSpec extends XmlSpec {
def configureNotify() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaClass
import com.github.moaxcp.x11protocol.xcbparser.JavaPadAlign
import com.github.moaxcp.x11protocol.xcbparser.JavaPrimativeListProperty
import com.github.moaxcp.x11protocol.xcbparser.XUnitListField
import com.squareup.javapoet.CodeBlock

class JavaPadAlignSpec extends XmlSpec {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaReply
import com.github.moaxcp.x11protocol.xcbparser.JavaRequest
import com.github.moaxcp.x11protocol.xcbparser.XTypeRequest

class JavaReplySpec extends XmlSpec {
def queryTree() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaRequest
import com.github.moaxcp.x11protocol.xcbparser.XTypeRequest

class JavaRequestSpec extends XmlSpec {
def destroyWindow() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaStruct
import com.github.moaxcp.x11protocol.xcbparser.XTypeStruct
import com.squareup.javapoet.TypeSpec

import static com.github.moaxcp.x11protocol.xcbparser.JavaStruct.javaStruct
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaType
import com.github.moaxcp.x11protocol.xcbparser.JavaTypeListProperty
import com.github.moaxcp.x11protocol.xcbparser.XUnitListField
import com.squareup.javapoet.ClassName
import com.squareup.javapoet.ParameterizedTypeName
import com.squareup.javapoet.TypeSpec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaClass
import com.github.moaxcp.x11protocol.xcbparser.JavaTypeProperty
import com.github.moaxcp.x11protocol.xcbparser.XUnitField
import com.squareup.javapoet.ClassName
import com.squareup.javapoet.CodeBlock

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaStruct
import com.github.moaxcp.x11protocol.xcbparser.JavaUnion

class JavaUnionSpec extends XmlSpec {
def 'create behavior union'() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaReply
import com.github.moaxcp.x11protocol.xcbparser.XTypeRequest

class ReplyWithReadParamSpec extends XmlSpec {
def getDeviceMotionEventsReply() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaReply
import com.github.moaxcp.x11protocol.xcbparser.XTypeRequest

class SumOfSpec extends XmlSpec {
def listInputDevices() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.xcbparser.XResult
import com.github.moaxcp.x11protocol.xcbparser.XType
import com.github.moaxcp.x11protocol.xcbparser.XTypePrimative
import groovy.util.slurpersupport.GPathResult
import groovy.xml.MarkupBuilder
import spock.lang.Specification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.XTypeEvent

class XTypeEventSpec extends XmlSpec {
def create() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.xcbparser.XResult
import groovy.util.slurpersupport.GPathResult
import groovy.xml.MarkupBuilder
import spock.lang.Specification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.XTypeStruct
import com.github.moaxcp.x11protocol.xcbparser.XTypeUnion
import com.squareup.javapoet.ClassName

import static com.github.moaxcp.x11protocol.generator.Conventions.getUnionJavaName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaClass
import com.github.moaxcp.x11protocol.xcbparser.XUnitField
import com.squareup.javapoet.TypeName

import static com.github.moaxcp.x11protocol.xcbparser.XUnitField.xUnitField
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.XUnitListField

class XUnitListFieldSpec extends XmlSpec {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
package com.github.moaxcp.x11protocol.xcbparser

import com.github.moaxcp.x11protocol.XmlSpec
import com.github.moaxcp.x11protocol.xcbparser.JavaClass
import com.github.moaxcp.x11protocol.xcbparser.JavaPad
import com.github.moaxcp.x11protocol.xcbparser.JavaPadAlign
import com.github.moaxcp.x11protocol.xcbparser.JavaType
import com.github.moaxcp.x11protocol.xcbparser.XUnit
import com.github.moaxcp.x11protocol.xcbparser.XUnitPad
import com.github.moaxcp.x11protocol.xcbparser.XUnitPadAlign

import static com.github.moaxcp.x11protocol.xcbparser.XUnitPadFactory.xUnitPad

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
package com.github.moaxcp.x11protocol.xcbparser.expression

import com.github.moaxcp.x11protocol.xcbparser.*

import com.github.moaxcp.x11protocol.xcbparser.JavaClass
import com.github.moaxcp.x11protocol.xcbparser.JavaPrimitiveProperty
import com.github.moaxcp.x11protocol.xcbparser.XResult
import com.github.moaxcp.x11protocol.xcbparser.XUnitField
import com.github.moaxcp.x11protocol.xcbparser.expression.AddExpression
import com.github.moaxcp.x11protocol.xcbparser.expression.FieldRefExpression
import com.github.moaxcp.x11protocol.xcbparser.expression.MultiplyExpression
import com.github.moaxcp.x11protocol.xcbparser.expression.SubtractExpression
import com.github.moaxcp.x11protocol.xcbparser.expression.ValueExpression
import spock.lang.Specification

class AddExpressionSpec extends Specification {
Expand Down Expand Up @@ -34,13 +43,13 @@ class AddExpressionSpec extends Specification {
new XUnitField(result: xResult, name: 'a', type: 'CARD8')
)
AddExpression expression = new AddExpression(expressions: [
new ValueExpression(value:7),
new MultiplyExpression(expressions:[
new ValueExpression(value:7),
new MultiplyExpression(expressions:[
new ValueExpression(value:8),
new FieldRefExpression(javaType: javaClass, fieldName:'a')]),
new SubtractExpression(expressions: [
new ValueExpression(value:5),
new ValueExpression(value:4)])])
new SubtractExpression(expressions: [
new ValueExpression(value:5),
new ValueExpression(value:4)])])

when:
String result = expression.expression.toString()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
package com.github.moaxcp.x11protocol.xcbparser.expression

import com.github.moaxcp.x11protocol.xcbparser.*

import com.github.moaxcp.x11protocol.xcbparser.JavaClass
import com.github.moaxcp.x11protocol.xcbparser.JavaPrimitiveProperty
import com.github.moaxcp.x11protocol.xcbparser.XResult
import com.github.moaxcp.x11protocol.xcbparser.XUnitField
import com.github.moaxcp.x11protocol.xcbparser.expression.AddExpression
import com.github.moaxcp.x11protocol.xcbparser.expression.DivideExpression
import com.github.moaxcp.x11protocol.xcbparser.expression.FieldRefExpression
import com.github.moaxcp.x11protocol.xcbparser.expression.ValueExpression
import spock.lang.Specification

class DivideExpressionSpec extends Specification {
Expand All @@ -26,11 +34,11 @@ class DivideExpressionSpec extends Specification {
)
}
DivideExpression expression = new DivideExpression(expressions:[
new FieldRefExpression(javaType:javaClass, fieldName:'a'),
new AddExpression(expressions:[
new FieldRefExpression(javaType:javaClass, fieldName:'a'),
new AddExpression(expressions:[
new FieldRefExpression(javaType:javaClass, fieldName:'b'),
new FieldRefExpression(javaType:javaClass, fieldName:'c')]),
new FieldRefExpression(javaType:javaClass, fieldName:'d')])
new FieldRefExpression(javaType:javaClass, fieldName:'d')])

when:
String result = expression.expression.toString()
Expand Down
Loading

0 comments on commit 5023734

Please sign in to comment.