Skip to content

Commit

Permalink
For LouisCAD#8: Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sijanr committed Oct 30, 2020
1 parent bed92b4 commit eab6363
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 6 deletions.
19 changes: 14 additions & 5 deletions kotlin-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
import Square.wire
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm")
kotlin("kapt")
kotlin("plugin.serialization")
id("com.squareup.sqldelight")
id("com.squareup.wire")
id ("application")
}

group = "playground"

repositories {
mavenLocal()
mavenCentral()
google()
jcenter()
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap/")
}


sqldelight {
database("AppDatabase") {
packageName = "util"
}
linkSqlite = false
}

wire {
kotlin {

}
}


// File build.gradle.kts
dependencies {

Expand All @@ -49,6 +58,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:_")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:_")
implementation("org.kodein.di:kodein-di:_")
implementation ("com.squareup.wire:wire-runtime:3.4.0")
implementation(JakeWharton.retrofit2.converter.kotlinxSerialization)
implementation(Kotlin.stdlib.jdk8)
implementation(KotlinX.collections.immutable)
Expand Down Expand Up @@ -91,9 +101,7 @@ tasks.withType<Test> {
useJUnitPlatform()
}

tasks.register("run", JavaExec::class.java) {
this.main = "playground._mainKt"
}


/**
* How do I setup GitHub Actions for my Gradle or Android project?
Expand Down Expand Up @@ -121,3 +129,4 @@ tasks.register<DefaultTask>("hello") {
group = "Custom"
description = "Minimal task that do nothing. Useful to debug a failing build"
}

11 changes: 10 additions & 1 deletion kotlin-jvm/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import de.fayard.refreshVersions.bootstrapRefreshVersions

pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}

buildscript {
repositories { mavenLocal() ; gradlePluginPortal() }
repositories { mavenLocal() }
val useSnapshot = false
dependencies.classpath(
if (useSnapshot) "de.fayard.refreshVersions:refreshVersions:0.9.6-SNAPSHOT" else "de.fayard.refreshVersions:refreshVersions:0.9.5"
Expand All @@ -12,6 +19,7 @@ plugins {
id("com.gradle.enterprise") version "3.4.1"
}


// https://dev.to/jmfayard/the-one-gradle-trick-that-supersedes-all-the-others-5bpg
gradleEnterprise {
buildScan {
Expand All @@ -21,6 +29,7 @@ gradleEnterprise {
}
}


rootProject.name = "kotlin-libraries-playground"

bootstrapRefreshVersions()
4 changes: 4 additions & 0 deletions kotlin-jvm/src/main/kotlin/playground/wire/Wire.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package playground.wire

fun main() {
}
15 changes: 15 additions & 0 deletions kotlin-jvm/src/main/kotlin/playground/wire/proto/ProtoFile.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

//Using proto3 version of the proto buffer language
syntax = "proto3";

// message type
message HacktoberFest {
string library_name = 1;
repeated int32 hacktoberfest_participation_years = 2;
User user = 3;
}

message User {
string user_name = 1;
bool user_participation_this_year = 2;
}
4 changes: 4 additions & 0 deletions kotlin-jvm/versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

plugin.com.squareup.sqldelight=1.4.3

plugin.com.squareup.wire=3.4.0

version.com.github.ajalt.clikt..clikt=3.0.1

version.com.github.ajalt.mordant=1.2.1
Expand Down Expand Up @@ -74,3 +76,5 @@ version.retrofit2=2.9.0
version.sqldelight=1.4.3

version.com.github.ajalt..mordant=1.2.1

version.wire=3.4.0

0 comments on commit eab6363

Please sign in to comment.