Skip to content

Instantly share code, notes, and snippets.

@cbeust
Created February 1, 2016 22:05
Show Gist options
  • Save cbeust/d62d6491cc093d52eb01 to your computer and use it in GitHub Desktop.
Save cbeust/d62d6491cc093d52eb01 to your computer and use it in GitHub Desktop.
$ ./kobaltw test ~/t/wire
__ __ __ __ __
/ //_/ ____ / /_ ____ _ / / / /_
/ ,< / __ \ / __ \ / __ `/ / / / __/
/ /| | / /_/ / / /_/ // /_/ / / / / /_
/_/ |_| \____/ /_.___/ \__,_/ /_/ \__/ 0.407
╔════════════════════════════╗
║ Building wire-gson-support ║
╚════════════════════════════╝
───── wire-gson-support:compile
───── wire-gson-support:compileTest
───── wire-gson-support:test
Running tests with classpath size 10
JUnit version 4.12
..
Time: 0.132
OK (2 tests)
All tests passed
╔══════════════════════╗
║ Building wire-schema ║
╚══════════════════════╝
───── wire-schema:compile
───── wire-schema:compileTest
───── wire-schema:test
Running tests with classpath size 17
JUnit version 4.12
.................................................................................................................................................................................................................................................................................
Time: 0.554
OK (273 tests)
All tests passed
╔══════════════════════════════╗
║ Building wire-codegen-sample ║
╚══════════════════════════════╝
───── wire-codegen-sample:compile
───── wire-codegen-sample:compileTest
───── wire-codegen-sample:test
Running tests with classpath size 39
JUnit version 4.12
.
Time: 0.198
OK (1 test)
All tests passed
╔══════════════════════════════╗
║ Building wire-java-generator ║
╚══════════════════════════════╝
───── wire-java-generator:compile
───── wire-java-generator:compileTest
───── wire-java-generator:test
Running tests with classpath size 17
JUnit version 4.12
...
Time: 0.053
OK (3 tests)
All tests passed
╔═══════════════════════╗
║ Building wire-runtime ║
╚═══════════════════════╝
───── wire-runtime:compile
───── wire-runtime:compileTest
───── wire-runtime:test
Running tests with classpath size 13
JUnit version 4.12
......I.....I...................................
Time: 0.112
OK (46 tests)
All tests passed
╔════════════════════════╗
║ Building wire-compiler ║
╚════════════════════════╝
───── wire-compiler:compile
───── wire-compiler:compileTest
───── wire-compiler:test
Running tests with classpath size 18
JUnit version 4.12
............Comparing against expected output AllTypes.java
.Comparing against expected output A.java.pruned
Comparing against expected output D.java.pruned
.Comparing against expected output OneOfMessage.java
.Comparing against expected output VersionOne.java
Comparing against expected output VersionTwo.java
.Comparing against expected output Bar.java
Comparing against expected output Foo.java
.Comparing against expected output Person.java.android
.Comparing against expected output NotRedacted.java
Comparing against expected output Redacted.java
Comparing against expected output RedactedChild.java
Comparing against expected output RedactedCycleA.java
Comparing against expected output RedactedCycleB.java
Comparing against expected output RedactedExtension.java
Comparing against expected output RedactedRepeated.java
Comparing against expected output RedactedRequired.java
.Comparing against expected output FooBar.java.noOptions
Comparing against expected output MessageWithOptions.java.noOptions
.Comparing against expected output NoFields.java
Comparing against expected output OneField.java
Comparing against expected output OneBytesField.java
Comparing against expected output Recursive.java
.Comparing against expected output ChildPackage.java
.Comparing against expected output Foo.java
Comparing against expected output Foos.java
Comparing against expected output Bar.java
Comparing against expected output Bars.java
..Comparing against expected output Bar.java
Comparing against expected output Foo.java
.Comparing against expected output Person.java
.Comparing against expected output FooBar.java
Comparing against expected output MessageWithOptions.java
.Comparing against expected output A.java
Comparing against expected output B.java
Comparing against expected output C.java
Comparing against expected output D.java
.Comparing against expected output B.java
Comparing against expected output C.java
.Comparing against expected output E.java
Comparing against expected output G.java
.Comparing against expected output E.java
Comparing against expected output G.java
Comparing against expected output H.java
.Comparing against expected output I.java
Comparing against expected output J.java
Comparing against expected output K.java
.Comparing against expected output A.java
Comparing against expected output B.java
Comparing against expected output C.java
Comparing against expected output D.java
Comparing against expected output E.java
Comparing against expected output G.java
Comparing against expected output H.java
Comparing against expected output I.java
Comparing against expected output J.java
Comparing against expected output K.java
.Comparing against expected output SimpleMessage.java
Comparing against expected output ExternalMessage.java
Comparing against expected output ForeignEnum.java
Comparing against expected output ForeignMessage.java
.Comparing against expected output AllTypes.java.compact
.Comparing against expected output Foo.java
Comparing against expected output Foos.java
.
Time: 1.133
OK (36 tests)
All tests passed
BUILD SUCCESSFUL (13 seconds)
import com.beust.kobalt.*
import com.beust.kobalt.plugin.packaging.assemble
import com.beust.kobalt.plugin.java.*
import com.beust.kobalt.plugin.apt.*
val javaVersion = "1.7"
val projectBuildSourceEncoding = "UTF-8"
val GROUP = "com.squareup.wire"
val VERSION = "2.2.0-SNAPSHOT"
val wireCompiler = javaProject {
name = "wire-compiler"
group = GROUP
artifactId = name
version = VERSION
directory = name
dependencies {
compile("$GROUP:wire-runtime:$VERSION",
"$GROUP:wire-schema:$VERSION",
"$GROUP:wire-java-generator:$VERSION",
"com.squareup.okio:okio:",
"com.google.guava:guava:",
"com.squareup:javapoet:")
}
dependenciesTest {
compile("junit:junit:",
"org.assertj:assertj-core:",
"com.google.jimfs:jimfs:1.0")
}
assemble {
jar {
}
}
}
val wireJavaGenerator = javaProject {
name = "wire-java-generator"
group = GROUP
artifactId = name
version = VERSION
directory = name
dependencies {
compile("$GROUP:wire-runtime:$VERSION",
"$GROUP:wire-schema:$VERSION",
"com.squareup.okio:okio:",
"com.google.guava:guava:",
"com.squareup:javapoet:")
}
dependenciesTest {
compile("junit:junit:",
"org.assertj:assertj-core:",
"com.google.jimfs:jimfs:1.0")
}
assemble {
jar {
}
}
}
val wireRuntime = javaProject {
name = "wire-runtime"
group = GROUP
artifactId = name
version = VERSION
directory = name
sourceDirectoriesTest {
path("src/test/proto-java", "src/test/java")
}
dependencies {
compile("com.squareup.okio:okio:")
provided("com.intellij:annotations:12.0")
}
dependenciesTest {
compile("javax.inject:javax.inject:1",
"junit:junit:",
"com.squareup.retrofit:retrofit:1.2.2",
"com.netflix.rxjava:rxjava-core:0.18.3",
"org.assertj:assertj-core:")
}
assemble {
jar {
}
}
}
val wireSchema = javaProject {
name = "wire-schema"
group = GROUP
artifactId = name
version = VERSION
directory = name
dependencies {
compile("$GROUP:wire-runtime:$VERSION",
"com.squareup.okio:okio:",
"com.google.guava:guava:",
"com.squareup:javapoet:",
"com.google.auto.value:auto-value:")
}
dependenciesTest {
compile("junit:junit:",
"org.assertj:assertj-core:",
"com.google.jimfs:jimfs:1.0")
}
assemble {
jar {
}
}
}
val wireCodegenSample = javaProject {
name = "wire-codegen-sample"
group = GROUP
artifactId = name
version = VERSION
directory = name
dependencies {
compile("$GROUP:wire-runtime:$VERSION",
"$GROUP:wire-schema:$VERSION",
"$GROUP:wire-java-generator:$VERSION",
"com.squareup.okio:okio:",
"com.google.guava:guava:",
"com.squareup:javapoet:",
"org.apache.maven:maven-core:3.1.1",
"org.apache.maven:maven-plugin-api:3.1.1",
"org.apache.maven.plugin-tools:maven-plugin-annotations:3.2")
dependenciesTest {
compile("junit:junit:",
"org.assertj:assertj-core:")
}
}
assemble {
jar {
}
}
}
val wireGsonSupport = javaProject {
name = "wire-gson-support"
group = GROUP
artifactId = name
version = VERSION
directory = name
dependencies {
compile("$GROUP:wire-runtime:$VERSION",
"com.google.code.gson:gson:")
dependenciesTest {
compile("junit:junit:",
"org.assertj:assertj-core:")
}
}
assemble {
jar {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment