Skip to content

Commit

Permalink
Merge pull request antlr#13 from drieks/master
Browse files Browse the repository at this point in the history
some updates
  • Loading branch information
ftomassetti authored May 11, 2019
2 parents 3e94f41 + 42635d1 commit afc3722
Show file tree
Hide file tree
Showing 229 changed files with 161 additions and 230 deletions.
10 changes: 2 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@ jdk:
- oraclejdk8
install: true
script:
- ./gradlew :antlr-kotlin-runtime-jvm:test
- ./gradlew :antlr-kotlin-runtime-js:test
- ./gradlew :antlr-kotlin-runtime-common:install
- ./gradlew :antlr-kotlin-runtime-jvm:install
- ./gradlew :antlr-kotlin-runtime-js:install
- ./gradlew :antlr-kotlin-target:install
- ./gradlew :antlr-kotlin-gradle-plugin:install
- ./gradlew test
- ./gradlew publishToMavenLocal
- cd antlr-kotlin-examples-jvm && ../gradlew check && cd ..
# - cd antlr-kotlin-examples-js && ../gradlew check && cd ..


7 changes: 4 additions & 3 deletions antlr-kotlin-examples-jvm/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext.kotlin_version = '1.3.31'
ext.projectVersion = '0.0.3'
ext.projectVersion = '0.0.4'
ext.antlrKotlinVersion = projectVersion

repositories {
Expand All @@ -23,9 +23,10 @@ repositories {
}

dependencies {
compile "com.strumenta.antlr-kotlin:antlr-kotlin-runtime-common:$projectVersion"
compile "com.strumenta.antlr-kotlin:antlr-kotlin-runtime-jvm:$projectVersion"
compile "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
//testCompile 'junit:junit:4.12'
}
Expand All @@ -52,4 +53,4 @@ idea {
module {
sourceDirs += file("generated-src/antlr/")
}
}
}
32 changes: 0 additions & 32 deletions antlr-kotlin-gradle-plugin/build.gradle

This file was deleted.

18 changes: 18 additions & 0 deletions antlr-kotlin-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
plugins {
`java-library`
`maven-publish`
}

dependencies {
compile("org.antlr:antlr4:${Versions.antlr}")
compile(gradleApi())
compile(project(":antlr-kotlin-target"))
}

publishing {
publications {
register("mavenJava", MavenPublication::class) {
from(components["java"])
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import javax.inject.Inject;
import java.io.File;

import static org.gradle.api.plugins.JavaPlugin.COMPILE_CONFIGURATION_NAME;
import static org.gradle.api.plugins.JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME;

/**
* A plugin for adding support for the ANTLR Kotlin target to {@link JavaPlugin java projects}.
Expand Down Expand Up @@ -73,7 +73,7 @@ public void apply(final Project project) {
+ antlrKotlinVersion));
});

project.getConfigurations().getByName(COMPILE_CONFIGURATION_NAME).extendsFrom(antlrConfiguration);
project.getConfigurations().getByName(IMPLEMENTATION_CONFIGURATION_NAME).extendsFrom(antlrConfiguration);

// Wire the antlr configuration into all antlr tasks
project.getTasks().withType(AntlrKotlinTask.class, antlrTask -> antlrTask.getConventionMapping().map("antlrClasspath", () -> {
Expand Down
28 changes: 0 additions & 28 deletions antlr-kotlin-runtime-common/build.gradle

This file was deleted.

32 changes: 0 additions & 32 deletions antlr-kotlin-runtime-js/build.gradle

This file was deleted.

31 changes: 0 additions & 31 deletions antlr-kotlin-runtime-jvm/build.gradle

This file was deleted.

File renamed without changes.
63 changes: 63 additions & 0 deletions antlr-kotlin-runtime/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
plugins {
id 'kotlin-multiplatform'
id 'maven-publish'
}

kotlin {
targets {
fromPreset(presets.jvm, "jvm")
fromPreset(presets.js, "js")
}

sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
}

commonTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test-common'
implementation 'org.jetbrains.kotlin:kotlin-test-annotations-common'
}
}

jvmMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
}
}

jvmTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.jetbrains.kotlin:kotlin-test'
implementation 'org.jetbrains.kotlin:kotlin-test-junit'
}
}

jsMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
}

compileKotlinJs {
kotlinOptions.metaInfo = true
kotlinOptions.outputFile = "$project.buildDir.path/js/${project.name}.js"
kotlinOptions.sourceMap = true
kotlinOptions.moduleKind = "umd"
}
}

jsTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test-js'
}
}
}
}

task('test') {
dependsOn jvmTest
}
31 changes: 0 additions & 31 deletions antlr-kotlin-target/build.gradle

This file was deleted.

16 changes: 16 additions & 0 deletions antlr-kotlin-target/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
`java-library`
`maven-publish`
}

dependencies {
compile("org.antlr:antlr4:${Versions.antlr}")
}

publishing {
publications {
register("mavenJava", MavenPublication::class) {
from(components["java"])
}
}
}
22 changes: 0 additions & 22 deletions antlr-kotlin-target/src/test/kotlin/Example.kt

This file was deleted.

33 changes: 0 additions & 33 deletions build.gradle

This file was deleted.

Loading

0 comments on commit afc3722

Please sign in to comment.