-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update kotlin MPP and AGP versions (#30)
* Update kotlin and AGP versions * add github action * Bump moar * Upgrade to new javascript gradle pluign * Fix CI working dir
- Loading branch information
Showing
22 changed files
with
85 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Android CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build with Gradle | ||
run: ./gradlew check | ||
- name: Cache dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,5 @@ local.properties | |
*.so | ||
*.nes | ||
.externalNativeBuild | ||
.cxx | ||
.cxx | ||
node_modules |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,34 @@ | ||
apply plugin: 'kotlin-multiplatform' | ||
apply plugin: 'org.jetbrains.kotlin.frontend' | ||
|
||
kotlinFrontend { | ||
downloadNodeJsVersion = "latest" | ||
|
||
webpackBundle { | ||
bundleName = "main" | ||
contentPath = file('src/jsMain/web') | ||
webpackConfigFile = file('webpack.config.js').absolutePath | ||
sourceMapEnabled = true | ||
mode = "development" | ||
} | ||
|
||
npm { | ||
dependency "react" | ||
dependency "core-js" | ||
dependency "react-dom" | ||
dependency "react-router-dom" | ||
dependency "kotlin" | ||
// This looks like an unofficial package but I couldn't find the actual Jetbrains one, only kotlinx-html | ||
dependency "kotlinx-html-js" | ||
dependency "@jetbrains/kotlin-react" | ||
dependency "@jetbrains/kotlin-react-dom" | ||
dependency "@jetbrains/kotlin-extensions" | ||
dependency "@jetbrains/kotlin-react-router-dom" | ||
} | ||
plugins { | ||
id 'org.jetbrains.kotlin.js' version '1.3.71' | ||
} | ||
|
||
kotlin { | ||
sourceSets { | ||
jsMain { | ||
dependencies { | ||
implementation project(':lib') | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" | ||
// https://bintray.com/kotlin/kotlin-js-wrappers/kotlin-react | ||
implementation "org.jetbrains:kotlin-react:16.9.0-pre.83-kotlin-$kotlin_version" | ||
// https://bintray.com/kotlin/kotlin-js-wrappers/kotlin-react-dom | ||
implementation "org.jetbrains:kotlin-react-dom:16.9.0-pre.83-kotlin-$kotlin_version" | ||
// https://bintray.com/kotlin/kotlin-js-wrappers/kotlin-react-router-dom | ||
implementation "org.jetbrains:kotlin-react-router-dom:4.3.1-pre.83-kotlin-$kotlin_version" | ||
// https://github.com/Kotlin/kotlinx.html/releases | ||
implementation "org.jetbrains.kotlinx:kotlinx-html-js:0.6.12" | ||
} | ||
target { | ||
browser { | ||
} | ||
} | ||
|
||
targets { | ||
fromPreset(presets.js, 'js') { | ||
configure([compilations.main, compilations.test]) { | ||
tasks.getByName(compileKotlinTaskName).kotlinOptions { | ||
metaInfo = true | ||
outputFile = file("build/js/${project.name}.js") | ||
sourceMap = true | ||
moduleKind = 'commonjs' | ||
} | ||
} | ||
|
||
configure(compilations.main) { | ||
tasks.getByName(compileKotlinTaskName).kotlinOptions { | ||
main = "call" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
tasks.getByName('karma-run-single') { | ||
enabled false | ||
} | ||
} | ||
|
||
task copyLibs(type: Copy) { | ||
destinationDir buildDir | ||
|
||
into("js") { | ||
from project(':lib').file("build/js") | ||
sourceSets["main"].dependencies { | ||
implementation npm("react", "16.13.1") | ||
implementation npm("core-js", "3.6.4") | ||
implementation npm("react-dom", "16.13.1") | ||
implementation npm("react-router-dom", "5.1.2") | ||
// This looks like an unofficial package but I couldn't find the actual Jetbrains one, only kotlinx-html | ||
implementation npm("kotlinx-html-js", "0.6.4") | ||
implementation npm("@jetbrains/kotlin-react", "16.9.0-pre.91") | ||
implementation npm("@jetbrains/kotlin-react-dom", "16.9.0-pre.91") | ||
implementation npm("@jetbrains/kotlin-extensions", "1.0.1-pre.91") | ||
implementation npm("@jetbrains/kotlin-react-router-dom", "4.3.1-pre.91") | ||
|
||
implementation project(':lib') | ||
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" | ||
// https://bintray.com/kotlin/kotlin-js-wrappers/kotlin-react | ||
implementation "org.jetbrains:kotlin-react:16.13.0-pre.94-kotlin-1.3.70" | ||
// https://bintray.com/kotlin/kotlin-js-wrappers/kotlin-react-dom | ||
implementation "org.jetbrains:kotlin-react-dom:16.13.0-pre.94-kotlin-1.3.70" | ||
// https://bintray.com/kotlin/kotlin-js-wrappers/kotlin-react-router-dom | ||
implementation "org.jetbrains:kotlin-react-router-dom:4.3.1-pre.94-kotlin-1.3.70" | ||
// https://github.com/Kotlin/kotlinx.html/releases | ||
implementation "org.jetbrains.kotlinx:kotlinx-html-js:0.7.1" | ||
} | ||
} | ||
|
||
bundle { | ||
dependsOn copyLibs | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|