Skip to content

Commit

Permalink
Prepare next development version.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Aug 27, 2021
1 parent 8cff774 commit dfbac61
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
- name: Upload snapshot (main only)
run: |
./gradlew --stop && jps|grep -E 'KotlinCompileDaemon|GradleDaemon'| awk '{print $1}'| xargs kill -9 || true
./gradlew publishAllPublicationsToMavenCentralRepository -PmavenCentralUsername=${{ secrets.SONATYPE_USERNAME }} -PmavenCentralPassword=${{ secrets.SONATYPE_PASSWORD }}
./gradlew publish -PmavenCentralUsername=${{ secrets.SONATYPE_USERNAME }} -PmavenCentralPassword=${{ secrets.SONATYPE_PASSWORD }}
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.java_version == '16' && !matrix.ksp_enabled
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Releasing
2. Update the `CHANGELOG.md` for the impending release.
3. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
4. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version)
5. `./gradlew clean publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel && ./gradlew closeAndReleaseRepository`
5. `./gradlew clean publish --no-daemon --no-parallel && ./gradlew closeAndReleaseRepository`
* Make sure to run this with JDK 16
6. Update the `gradle.properties` to the next SNAPSHOT version.
7. `git commit -am "Prepare next development version."`
Expand Down
16 changes: 5 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,31 @@
# Adds exports for GJF in spotless
# https://github.com/diffplug/spotless/issues/834
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED

kotlin.daemon.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED

GROUP=dev.zacsweers.moshix
VERSION_NAME=0.13.0
VERSION_NAME=0.14.0-SNAPSHOT
POM_DESCRIPTION=Moshi Extensions
POM_URL=https://github.com/ZacSweers/MoshiX
POM_SCM_URL=https://github.com/ZacSweers/MoshiX
Expand Down
4 changes: 2 additions & 2 deletions moshi-adapters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm")
kotlin("kapt")
alias(libs.plugins.ksp)
id("com.vanniktech.maven.publish")
}

Expand All @@ -31,7 +31,7 @@ tasks.named<KotlinCompile>("compileTestKotlin") {

dependencies {
implementation(libs.moshi)
kaptTest(libs.moshi.codegen)
kspTest(project(":moshi-ksp"))
testImplementation(libs.moshi.kotlin)
testImplementation(libs.okhttp)
testImplementation(libs.okhttp.mockwebserver)
Expand Down
6 changes: 3 additions & 3 deletions moshi-metadata-reflect/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm")
kotlin("kapt")
alias(libs.plugins.ksp)
id("com.vanniktech.maven.publish")
}

Expand All @@ -32,8 +32,8 @@ tasks.named<KotlinCompile>("compileTestKotlin") {
dependencies {
implementation(libs.kotlin.metadata)
implementation(libs.moshi)
kaptTest(libs.moshi.codegen)
testImplementation("org.assertj:assertj-core:3.11.1")
kspTest(project(":moshi-ksp"))
testImplementation("org.assertj:assertj-core:3.20.2")
testImplementation(libs.junit)
testImplementation(libs.truth)
}
9 changes: 2 additions & 7 deletions moshi-sealed/codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@
*/

plugins {
// TODO use ksp version again when ksp supports 1.4.30
// https://github.com/google/ksp/issues/267
// id("com.google.devtools.ksp") version Dependencies.Kotlin.Ksp.version
kotlin("jvm")
kotlin("kapt")
alias(libs.plugins.ksp)
id("com.vanniktech.maven.publish")
}

dependencies {
implementation(libs.autoService)
kapt(libs.autoService.processor)
kapt(libs.incap.processor)
compileOnly(libs.incap)
ksp(libs.autoService.ksp)

implementation(libs.autoCommon)
implementation(libs.kotlinpoet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ import dev.zacsweers.moshix.sealed.annotations.DefaultObject
import dev.zacsweers.moshix.sealed.annotations.TypeLabel
import dev.zacsweers.moshix.sealed.codegen.MoshiSealedProcessor.Companion.OPTION_GENERATED
import dev.zacsweers.moshix.sealed.runtime.internal.ObjectJsonAdapter
import net.ltgt.gradle.incap.IncrementalAnnotationProcessor
import net.ltgt.gradle.incap.IncrementalAnnotationProcessorType
import javax.annotation.processing.AbstractProcessor
import javax.annotation.processing.Filer
import javax.annotation.processing.Messager
Expand All @@ -65,7 +63,6 @@ import javax.lang.model.util.Types
import javax.tools.Diagnostic

@KotlinPoetMetadataPreview
@IncrementalAnnotationProcessor(IncrementalAnnotationProcessorType.AGGREGATING)
@SupportedOptions(OPTION_GENERATED)
@AutoService(Processor::class)
public class MoshiSealedProcessor : AbstractProcessor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dev.zacsweers.moshix.sealed.codegen.MoshiSealedProcessor,aggregating

0 comments on commit dfbac61

Please sign in to comment.