diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 8dada3edaf..0000000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md index dc178130ac..4aebbf6355 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,41 @@ kotlin-examples =============== -[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) +[![Obsolete JetBrains project](http://jb.gg/badges/obsolete.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) -Various examples for Kotlin +The repository is archived as we have moved towards other sources of examples, including project-specific and tutorial-based ones, such as https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-samples.html, https://github.com/ktorio/ktor-samples and https://developer.android.com/samples. + +=== + +Various examples for [Kotlin](https://kotlinlang.org/) + +If anything is missing or seems confusing, please create an issue in the [Kotlin issue tracker](https://youtrack.jetbrains.com/newIssue?project=KT&c=Type%20Task&c=Subsystems%20Docs%20%26%20Examples&c=Assignee%20dmitry.romanov) + +[Kotlin Multiplatform Mobile](https://kotlinlang.org/lp/mobile/): +- https://github.com/Kotlin/kmm-production-sample - This is an open-source, mobile, cross-platform application built with Kotlin Multiplatform Mobile (KMM). It’s a simple RSS reader, and you can download it from the [App Store](https://apps.apple.com/ru/app/kmm-rss-reader/id1563922264) and [Google Play](https://play.google.com/store/apps/details?id=com.github.jetbrains.rssreader.androidApp). It’s been designed to demonstrate how KMM can be used in real production projects. +- https://github.com/Kotlin/kmm-basic-sample - This is a Kotlin Multiplatform Mobile (KMM) sample project. It includes iOS and Android applications with a native UI and a module with code shared on iOS and Android. +- https://github.com/Kotlin/kmm-integration-sample - This is a sample project for the ["Make your Android application work on iOS"](https://kotlinlang.org/docs/mobile/integrate-in-existing-app.html) tutorial. Master branch contains the project’s initial state: it’s a simple Android application generated with the Android Studio “Login application” wizard. You could find the final state with the iOS application and shared KMM module in the [final branch](https://github.com/Kotlin/kmm-integration-sample/tree/final). +- https://github.com/Kotlin/kmm-with-cocoapods-sample - This is a sample project represents the case when Cocoapods dependencies added in Kotlin and there is no existing Xcode project. +- https://github.com/Kotlin/kmm-with-cocoapods-multitarget-xcode-sample - This project is intended to demonstrate how to connect Kotlin library to Xcode project with several targets: iOS, macOS, tvOS, watchOS +- https://github.com/Kotlin/kmm-with-cocoapods-xcode-two-kotlin-libraries-sample - This project is intended to demonstrate the connection of two Kotlin libraries to existing Xcode project through Cocoapods. + +[Kotlin for Server-side](https://kotlinlang.org/lp/server-side/): +- https://github.com/ktorio/ktor-samples - A collection of ready-to-use samples for [Ktor](https://ktor.io/). +- https://github.com/spring-petclinic/spring-petclinic-kotlin - This is a Kotlin version of the [spring-petclinic](https://github.com/spring-projects/spring-petclinic) application. + +[Kotlin for Web frontend](https://kotlinlang.org/docs/js-overview.html): +- https://github.com/Kotlin/full-stack-web-jetbrains-night-sample - A full-stack demo application written in Kotlin for JetBrains Night Moscow 2019. +- https://github.com/Kotlin/react-redux-todo-list-sample - This project is a PoC of using Kotlin (JS) and React, React-Dom, React-Router, Redux and React-Redux. This project is an implementation/translation of the react-redux [Todo List example project](https://redux.js.org/basics/example) in Kotlin (with the addition of react-router). +- https://github.com/Kotlin/full-stack-spring-collaborative-todo-list-sample - Collaborative todo-list with Spring, Kotlin and RSocket. + +[Kotlin Native](https://kotlinlang.org/docs/native-overview.html): +- https://github.com/JetBrains/kotlin/tree/master/kotlin-native/samples - This repository contains a set of samples demonstrating how one can work with Kotlin/Native. + +[Kotlin for Android](https://kotlinlang.org/docs/android-overview.html): +- https://developer.android.com/samples + +Kotlin Script: +- https://github.com/Kotlin/kotlin-script-examples - This repository contains example projects and individual scripts, as well as links to the external examples demonstrating Kotlin Scripting functionality and API usage. + +[Dokka](https://github.com/Kotlin/dokka): +- https://github.com/Kotlin/dokka/tree/master/examples diff --git a/gradle/android-auto-parcel/.gitignore b/gradle/android-auto-parcel/.gitignore deleted file mode 100644 index e4796039a3..0000000000 --- a/gradle/android-auto-parcel/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.gradle -/local.properties -/.idea -.DS_Store -/build -/captures -*.iml \ No newline at end of file diff --git a/gradle/android-auto-parcel/app/.gitignore b/gradle/android-auto-parcel/app/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/gradle/android-auto-parcel/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/gradle/android-auto-parcel/app/build.gradle b/gradle/android-auto-parcel/app/build.gradle deleted file mode 100755 index 9e705d8b0a..0000000000 --- a/gradle/android-auto-parcel/app/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'kotlin-kapt' - -dependencies { - provided "frankiesardo:auto-parcel:$autoparcel_version" - kapt "frankiesardo:auto-parcel:$autoparcel_version" - - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" -} - -android { - compileSdkVersion 22 - buildToolsVersion "22.0.1" - - defaultConfig { - minSdkVersion 14 - targetSdkVersion 25 - } - - compileSdkVersion 25 - buildToolsVersion "25.0.2" -} - diff --git a/gradle/android-auto-parcel/app/src/main/AndroidManifest.xml b/gradle/android-auto-parcel/app/src/main/AndroidManifest.xml deleted file mode 100755 index 7c2c298885..0000000000 --- a/gradle/android-auto-parcel/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/DetailActivity.java b/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/DetailActivity.java deleted file mode 100755 index 70ec21683a..0000000000 --- a/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/DetailActivity.java +++ /dev/null @@ -1,24 +0,0 @@ -package auto.parcel.sample; - -import android.app.Activity; -import android.os.Bundle; -import android.widget.TextView; -import model3.Person; - -public class DetailActivity extends Activity { - - @Override protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_detail); - Person person = getIntent().getParcelableExtra("Person"); - textView(R.id.name).setText("Name:" + person.name()); - textView(R.id.id).setText("Id:" + person.id()); - textView(R.id.height).setText("Height:" + person.heightType()); - textView(R.id.addresses).setText("Addresses:" + person.addresses()); - textView(R.id.friends).setText("Friends:" + person.friends()); - } - - private TextView textView(int id) { - return (TextView) findViewById(id); - } -} diff --git a/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/MainActivity.kt b/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/MainActivity.kt deleted file mode 100755 index a4931c6c27..0000000000 --- a/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/MainActivity.kt +++ /dev/null @@ -1,20 +0,0 @@ -package auto.parcel.sample - -import android.app.Activity -import android.content.Intent -import android.os.Bundle -import android.view.View -import kotlinx.android.synthetic.main.activity_main.* - -class MainActivity : Activity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - click_me.setOnClickListener { - val detailIntent = Intent(this, DetailActivity::class.java) - detailIntent.putExtra("Person", SampleData.BOB) - startActivity(detailIntent) - } - } -} diff --git a/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/SampleData.kt b/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/SampleData.kt deleted file mode 100755 index fd964754b7..0000000000 --- a/gradle/android-auto-parcel/app/src/main/java/auto/parcel/sample/SampleData.kt +++ /dev/null @@ -1,26 +0,0 @@ -package auto.parcel.sample - -import java.util.Arrays -import java.util.Collections -import java.util.HashMap - -import model1.HeightBucket -import model2.Address -import model3.Person - -interface SampleData { - companion object { - val ALICE = Person.create("Alice", 1L, HeightBucket.AVERAGE, - addresses = hashMapOf("home" to Address.create(doubleArrayOf(0.3, 0.7), "Rome")), - friends = emptyList()) - - val BOB = Person.builder() - .name("Bob") - .id(2L) - .heightType(HeightBucket.TALL) - .addresses(hashMapOf( - "home" to Address.create(doubleArrayOf(3.2, 143.2), "Turin"), - "work" to Address.create(doubleArrayOf(5.9, 156.1), "Genoa"))) - .friends(Arrays.asList(ALICE)).build() - } -} diff --git a/gradle/android-auto-parcel/app/src/main/java/model1/HeightBucket.kt b/gradle/android-auto-parcel/app/src/main/java/model1/HeightBucket.kt deleted file mode 100755 index 09307278f3..0000000000 --- a/gradle/android-auto-parcel/app/src/main/java/model1/HeightBucket.kt +++ /dev/null @@ -1,5 +0,0 @@ -package model1 - -enum class HeightBucket { - SHORT, AVERAGE, TALL -} \ No newline at end of file diff --git a/gradle/android-auto-parcel/app/src/main/java/model2/Address.kt b/gradle/android-auto-parcel/app/src/main/java/model2/Address.kt deleted file mode 100755 index 7daa92cdf8..0000000000 --- a/gradle/android-auto-parcel/app/src/main/java/model2/Address.kt +++ /dev/null @@ -1,27 +0,0 @@ -package model2 - -import com.google.auto.value.AutoValue - -import android.os.Parcelable - -@AutoValue -abstract class Address : Parcelable { - abstract fun coordinates(): DoubleArray - abstract fun cityName(): String - - @AutoValue.Builder - interface Builder { - fun coordinates(x: DoubleArray): Builder - fun cityName(x: String): Builder - fun build(): Address - } - - companion object { - fun create(coordinates: DoubleArray, cityName: String): Address { - return builder().coordinates(coordinates).cityName(cityName).build() - } - - fun builder(): Builder = `$AutoValue_Address`.Builder() - } - -} diff --git a/gradle/android-auto-parcel/app/src/main/java/model3/Person.kt b/gradle/android-auto-parcel/app/src/main/java/model3/Person.kt deleted file mode 100755 index 1c4d796a0b..0000000000 --- a/gradle/android-auto-parcel/app/src/main/java/model3/Person.kt +++ /dev/null @@ -1,44 +0,0 @@ -package model3 - -import com.google.auto.value.AutoValue - -import android.os.Parcelable - -import model1.HeightBucket -import model2.Address - -@AutoValue -abstract class Person : Parcelable { - abstract fun name(): String - abstract fun id(): Long - abstract fun heightType(): HeightBucket - abstract fun addresses(): MutableMap - abstract fun friends(): MutableList - - @AutoValue.Builder - interface Builder { - fun name(s: String): Builder - fun id(n: Long): Builder - fun heightType(x: HeightBucket): Builder - fun addresses(x: MutableMap): Builder - fun friends(x: MutableList): Builder - fun build(): Person - } - - companion object { - fun create(name: String, - id: Long, - heightType: HeightBucket, - addresses: Map, - friends: List - ) = builder() - .name(name) - .id(id) - .heightType(heightType) - .addresses(addresses as? MutableMap ?: addresses.toMutableMap()) - .friends(friends as? MutableList ?: friends.toMutableList()) - .build() - - fun builder(): Builder = `$AutoValue_Person`.Builder() - } -} diff --git a/gradle/android-auto-parcel/app/src/main/res/drawable-hdpi/ic_launcher.png b/gradle/android-auto-parcel/app/src/main/res/drawable-hdpi/ic_launcher.png deleted file mode 100755 index 96a442e5b8..0000000000 Binary files a/gradle/android-auto-parcel/app/src/main/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-auto-parcel/app/src/main/res/drawable-mdpi/ic_launcher.png b/gradle/android-auto-parcel/app/src/main/res/drawable-mdpi/ic_launcher.png deleted file mode 100755 index 359047dfa4..0000000000 Binary files a/gradle/android-auto-parcel/app/src/main/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-auto-parcel/app/src/main/res/drawable-xhdpi/ic_launcher.png b/gradle/android-auto-parcel/app/src/main/res/drawable-xhdpi/ic_launcher.png deleted file mode 100755 index 71c6d760f0..0000000000 Binary files a/gradle/android-auto-parcel/app/src/main/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-auto-parcel/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/gradle/android-auto-parcel/app/src/main/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100755 index 4df1894644..0000000000 Binary files a/gradle/android-auto-parcel/app/src/main/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-auto-parcel/app/src/main/res/layout/activity_detail.xml b/gradle/android-auto-parcel/app/src/main/res/layout/activity_detail.xml deleted file mode 100755 index 2c0c9ae4ef..0000000000 --- a/gradle/android-auto-parcel/app/src/main/res/layout/activity_detail.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/gradle/android-auto-parcel/app/src/main/res/layout/activity_main.xml b/gradle/android-auto-parcel/app/src/main/res/layout/activity_main.xml deleted file mode 100755 index f7f5945bde..0000000000 --- a/gradle/android-auto-parcel/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/layout/activity_main2.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/layout/activity_main2.xml deleted file mode 100644 index d707536a92..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/layout/activity_main2.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/menu/main.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/menu/main.xml deleted file mode 100644 index f3b10b6c02..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/menu/main.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/menu/main_activity2.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/menu/main_activity2.xml deleted file mode 100644 index f3b10b6c02..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/menu/main_activity2.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-sw600dp/dimens.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-sw600dp/dimens.xml deleted file mode 100644 index 886b05fa96..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-sw600dp/dimens.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-sw720dp-land/dimens.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-sw720dp-land/dimens.xml deleted file mode 100644 index 00059fc5c3..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-sw720dp-land/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 128dp - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-v11/styles.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-v11/styles.xml deleted file mode 100644 index 3c02242ad0..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-v11/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-v14/styles.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-v14/styles.xml deleted file mode 100644 index a91fd0372b..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values-v14/styles.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/dimens.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/dimens.xml deleted file mode 100644 index 47c8224673..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 16dp - 16dp - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/strings.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/strings.xml deleted file mode 100644 index d8f08bc2ab..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - AndroidSample - Settings - Hello world! - JavaActivity - KotlinActivity - - diff --git a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/styles.xml b/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/styles.xml deleted file mode 100644 index 6ce89c7ba4..0000000000 --- a/gradle/android-mixed-java-kotlin-project/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/gradle/android-mixed-java-kotlin-project/build.gradle b/gradle/android-mixed-java-kotlin-project/build.gradle deleted file mode 100644 index ef7ae5ac82..0000000000 --- a/gradle/android-mixed-java-kotlin-project/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - jcenter() - } -} diff --git a/gradle/android-mixed-java-kotlin-project/gradle/wrapper/gradle-wrapper.jar b/gradle/android-mixed-java-kotlin-project/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 085a1cdc27..0000000000 Binary files a/gradle/android-mixed-java-kotlin-project/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/android-mixed-java-kotlin-project/gradle/wrapper/gradle-wrapper.properties b/gradle/android-mixed-java-kotlin-project/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 8dd584b820..0000000000 --- a/gradle/android-mixed-java-kotlin-project/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Aug 31 19:50:11 CEST 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/gradle/android-mixed-java-kotlin-project/gradlew b/gradle/android-mixed-java-kotlin-project/gradlew deleted file mode 100644 index 91a7e269e1..0000000000 --- a/gradle/android-mixed-java-kotlin-project/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/android-mixed-java-kotlin-project/gradlew.bat b/gradle/android-mixed-java-kotlin-project/gradlew.bat deleted file mode 100644 index 8a0b282aa6..0000000000 --- a/gradle/android-mixed-java-kotlin-project/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/android-mixed-java-kotlin-project/settings.gradle b/gradle/android-mixed-java-kotlin-project/settings.gradle deleted file mode 100644 index e7b4def49c..0000000000 --- a/gradle/android-mixed-java-kotlin-project/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/gradle/android-realm/.gitignore b/gradle/android-realm/.gitignore deleted file mode 100644 index e4796039a3..0000000000 --- a/gradle/android-realm/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.gradle -/local.properties -/.idea -.DS_Store -/build -/captures -*.iml \ No newline at end of file diff --git a/gradle/android-realm/LICENSE.txt b/gradle/android-realm/LICENSE.txt deleted file mode 100644 index 36bf077ca5..0000000000 --- a/gradle/android-realm/LICENSE.txt +++ /dev/null @@ -1,247 +0,0 @@ -TABLE OF CONTENTS - -1. Apache License version 2.0 -2. Realm Components -3. Export Compliance - -1. ------------------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - -2. ------------------------------------------------------------------------------- - -REALM COMPONENTS - -This software contains components with separate copyright and license terms. -Your use of these components is subject to the terms and conditions of the -following licenses. - -For the Realm Platform Extensions component - - Realm Platform Extensions License - - Copyright (c) 2011-2016 Realm Inc All rights reserved - - Redistribution and use in binary form, with or without modification, is - permitted provided that the following conditions are met: - - 1. You agree not to attempt to decompile, disassemble, reverse engineer or - otherwise discover the source code from which the binary code was derived. - You may, however, access and obtain a separate license for most of the - source code from which this Software was created, at - http://realm.io/pricing/. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -3. ------------------------------------------------------------------------------- - -EXPORT COMPLIANCE - -You understand that the Software may contain cryptographic functions that may be -subject to export restrictions, and you represent and warrant that you are not -located in a country that is subject to United States export restriction or embargo, -including Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, and that you -are not on the Department of Commerce list of Denied Persons, Unverified Parties, -or affiliated with a Restricted Entity. - -You agree to comply with all export, re-export and import restrictions and -regulations of the Department of Commerce or other agency or authority of the -United States or other applicable countries. You also agree not to transfer, or -authorize the transfer of, directly or indirectly, the Software to any prohibited -country, including Cuba, Iran, North Korea, Sudan, Syria or the Crimea region, -or to any person or organization on or affiliated with the Department of -Commerce lists of Denied Persons, Unverified Parties or Restricted Entities, or -otherwise in violation of any such restrictions or regulations. \ No newline at end of file diff --git a/gradle/android-realm/app/.gitignore b/gradle/android-realm/app/.gitignore deleted file mode 100644 index 796b96d1c4..0000000000 --- a/gradle/android-realm/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/gradle/android-realm/app/build.gradle b/gradle/android-realm/app/build.gradle deleted file mode 100644 index 1d8532edd1..0000000000 --- a/gradle/android-realm/app/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'realm-android' - -android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' - - defaultConfig { - applicationId "com.example.dagger.kotlin" - minSdkVersion 14 - targetSdkVersion 25 - versionCode 1 - versionName "1.0" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:25.3.1' - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - - compile "org.jetbrains.anko:anko-common:$anko_version" - - compile "com.google.dagger:dagger:$dagger_version" - kapt "com.google.dagger:dagger-compiler:$dagger_version" -} \ No newline at end of file diff --git a/gradle/android-realm/app/proguard-rules.pro b/gradle/android-realm/app/proguard-rules.pro deleted file mode 100644 index 2193714bb6..0000000000 --- a/gradle/android-realm/app/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/yan/Library/Android/sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/gradle/android-realm/app/src/main/AndroidManifest.xml b/gradle/android-realm/app/src/main/AndroidManifest.xml deleted file mode 100755 index eecca70a66..0000000000 --- a/gradle/android-realm/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - diff --git a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/KotlinExampleActivity.kt b/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/KotlinExampleActivity.kt deleted file mode 100755 index b4a32de320..0000000000 --- a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/KotlinExampleActivity.kt +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright 2015 Realm Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.realm.examples.kotlin - -import android.app.Activity -import android.os.Bundle -import android.util.Log -import android.widget.LinearLayout -import android.widget.TextView -import io.realm.Realm -import io.realm.Sort -import io.realm.examples.kotlin.model.Cat -import io.realm.examples.kotlin.model.Dog -import io.realm.examples.kotlin.model.Person -import org.jetbrains.anko.doAsync -import org.jetbrains.anko.uiThread -import kotlin.properties.Delegates - -class KotlinExampleActivity : Activity() { - - companion object { - val TAG: String = KotlinExampleActivity::class.java.simpleName - } - - private var rootLayout: LinearLayout by Delegates.notNull() - private var realm: Realm by Delegates.notNull() - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_realm_basic_example) - rootLayout = findViewById(R.id.container) as LinearLayout - rootLayout.removeAllViews() - - // These operations are small enough that - // we can generally safely run them on the UI thread. - - // Open the realm for the UI thread. - realm = Realm.getDefaultInstance() - - // Delete all persons - // Using executeTransaction with a lambda reduces code size and makes it impossible - // to forget to commit the transaction. - realm.executeTransaction { - realm.deleteAll() - } - - basicCRUD(realm) - basicQuery(realm) - basicLinkQuery(realm) - - // More complex operations can be executed on another thread, for example using - // Anko's doAsync extension method. - doAsync { - var info = complexReadWrite() - info += complexQuery() - - uiThread { - showStatus(info) - } - } - } - - override fun onDestroy() { - super.onDestroy() - realm.close() // Remember to close Realm when done. - } - - private fun showStatus(txt: String) { - Log.i(TAG, txt) - val tv = TextView(this) - tv.text = txt - rootLayout.addView(tv) - } - - private fun basicCRUD(realm: Realm) { - showStatus("Perform basic Create/Read/Update/Delete (CRUD) operations...") - - // All writes must be wrapped in a transaction to facilitate safe multi threading - realm.executeTransaction { - // Add a person - val person = realm.createObject(Person::class.java, 0) - person.name = "Young Person" - person.age = 14 - } - - // Find the first person (no query conditions) and read a field - val person = realm.where(Person::class.java).findFirst() - showStatus(person.name + ": " + person.age) - - // Update person in a transaction - realm.executeTransaction { - person.name = "Senior Person" - person.age = 99 - showStatus(person.name + " got older: " + person.age) - } - } - - private fun basicQuery(realm: Realm) { - showStatus("\nPerforming basic Query operation...") - showStatus("Number of persons: ${realm.where(Person::class.java).count()}") - - val results = realm.where(Person::class.java).equalTo("age", 99).findAll() - - showStatus("Size of result set: " + results.size) - } - - private fun basicLinkQuery(realm: Realm) { - showStatus("\nPerforming basic Link Query operation...") - showStatus("Number of persons: ${realm.where(Person::class.java).count()}") - - val results = realm.where(Person::class.java).equalTo("cats.name", "Tiger").findAll() - - showStatus("Size of result set: ${results.size}") - } - - private fun complexReadWrite(): String { - var status = "\nPerforming complex Read/Write operation..." - - // Open the default realm. All threads must use its own reference to the realm. - // Those can not be transferred across threads. - val realm = Realm.getDefaultInstance() - try { - // Add ten persons in one transaction - realm.executeTransaction { - val fido = realm.createObject(Dog::class.java) - fido.name = "fido" - for (i in 1..9) { - val person = realm.createObject(Person::class.java, i.toLong()) - person.name = "Person no. $i" - person.age = i - person.dog = fido - - // The field tempReference is annotated with @Ignore. - // This means setTempReference sets the Person tempReference - // field directly. The tempReference is NOT saved as part of - // the RealmObject: - person.tempReference = 42 - - for (j in 0..i - 1) { - val cat = realm.createObject(Cat::class.java) - cat.name = "Cat_$j" - person.cats.add(cat) - } - } - } - - // Implicit read transactions allow you to access your objects - status += "\nNumber of persons: ${realm.where(Person::class.java).count()}" - - // Iterate over all objects - for (person in realm.where(Person::class.java).findAll()) { - val dogName: String = person?.dog?.name ?: "None" - - status += "\n${person.name}: ${person.age} : $dogName : ${person.cats.size}" - - // The field tempReference is annotated with @Ignore - // Though we initially set its value to 42, it has - // not been saved as part of the Person RealmObject: - check(person.tempReference == 0) - } - - // Sorting - val sortedPersons = realm.where(Person::class.java).findAllSorted("age", Sort.DESCENDING) - status += "\nSorting ${sortedPersons.last().name} == ${realm.where(Person::class.java).findAll().first().name}" - - } finally { - realm.close() - } - return status - } - - private fun complexQuery(): String { - var status = "\n\nPerforming complex Query operation..." - - // Realm implements the Closable interface, therefore we can make use of Kotlin's built-in - // extension method 'use' (pun intended). - Realm.getDefaultInstance().use { - // 'it' is the implicit lambda parameter of type Realm - status += "\nNumber of persons: ${it.where(Person::class.java).count()}" - - // Find all persons where age between 7 and 9 and name begins with "Person". - val results = it - .where(Person::class.java) - .between("age", 7, 9) // Notice implicit "and" operation - .beginsWith("name", "Person") - .findAll() - - status += "\nSize of result set: ${results.size}" - - } - - return status - } - - -} diff --git a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/MyApplication.kt b/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/MyApplication.kt deleted file mode 100755 index a4b9665a3b..0000000000 --- a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/MyApplication.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2016 Realm Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.realm.examples.kotlin - -import android.app.Application - -import io.realm.Realm - -class MyApplication : Application() { - - override fun onCreate() { - super.onCreate() - // Initialize Realm. Should only be done once when the application starts. - Realm.init(this) - } -} diff --git a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Cat.kt b/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Cat.kt deleted file mode 100755 index 803eb7fcef..0000000000 --- a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Cat.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2015 Realm Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.realm.examples.kotlin.model - -import io.realm.RealmObject - -open class Cat : RealmObject() { - open var name: String? = null -} diff --git a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Dog.kt b/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Dog.kt deleted file mode 100755 index dd4b8452e8..0000000000 --- a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Dog.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2015 Realm Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.realm.examples.kotlin.model - -import io.realm.RealmObject - -open class Dog : RealmObject() { - open var name: String? = null -} diff --git a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Person.kt b/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Person.kt deleted file mode 100755 index c408a12472..0000000000 --- a/gradle/android-realm/app/src/main/kotlin/io/realm/examples/kotlin/model/Person.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2015 Realm Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.realm.examples.kotlin.model - -import io.realm.RealmList -import io.realm.RealmObject -import io.realm.annotations.Ignore -import io.realm.annotations.PrimaryKey - -// Your model has to extend RealmObject. Furthermore, the class and all of the -// properties must be annotated with open (Kotlin classes and methods are final -// by default). -open class Person( - // You can put properties in the constructor as long as all of them are initialized with - // default values. This ensures that an empty constructor is generated. - // All properties are by default persisted. - // Properties can be annotated with PrimaryKey or Index. - // If you use non-nullable types, properties must be initialized with non-null values. - @PrimaryKey open var id: Long = 0, - - open var name: String = "", - - open var age: Int = 0, - - // Other objects in a one-to-one relation must also subclass RealmObject - open var dog: Dog? = null, - - // One-to-many relations is simply a RealmList of the objects which also subclass RealmObject - open var cats: RealmList = RealmList(), - - // You can instruct Realm to ignore a field and not persist it. - @Ignore open var tempReference: Int = 0 - -) : RealmObject() { - // The Kotlin compiler generates standard getters and setters. - // Realm will overload them and code inside them is ignored. - // So if you prefer you can also just have empty abstract methods. -} diff --git a/gradle/android-realm/app/src/main/res/layout/activity_realm_basic_example.xml b/gradle/android-realm/app/src/main/res/layout/activity_realm_basic_example.xml deleted file mode 100755 index 8c5a06512e..0000000000 --- a/gradle/android-realm/app/src/main/res/layout/activity_realm_basic_example.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - diff --git a/gradle/android-realm/app/src/main/res/mipmap-hdpi/ic_launcher.png b/gradle/android-realm/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100755 index 58303aff5b..0000000000 Binary files a/gradle/android-realm/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-realm/app/src/main/res/mipmap-mdpi/ic_launcher.png b/gradle/android-realm/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100755 index 9b29caed3d..0000000000 Binary files a/gradle/android-realm/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-realm/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/gradle/android-realm/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100755 index 15527b160e..0000000000 Binary files a/gradle/android-realm/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-realm/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/gradle/android-realm/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100755 index eb9ece04b2..0000000000 Binary files a/gradle/android-realm/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-realm/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/gradle/android-realm/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100755 index 91826a7567..0000000000 Binary files a/gradle/android-realm/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-realm/app/src/main/res/values-w820dp/dimens.xml b/gradle/android-realm/app/src/main/res/values-w820dp/dimens.xml deleted file mode 100755 index 63fc816444..0000000000 --- a/gradle/android-realm/app/src/main/res/values-w820dp/dimens.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 64dp - diff --git a/gradle/android-realm/app/src/main/res/values/dimens.xml b/gradle/android-realm/app/src/main/res/values/dimens.xml deleted file mode 100755 index 47c8224673..0000000000 --- a/gradle/android-realm/app/src/main/res/values/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 16dp - 16dp - diff --git a/gradle/android-realm/app/src/main/res/values/strings.xml b/gradle/android-realm/app/src/main/res/values/strings.xml deleted file mode 100755 index 53e83c29d6..0000000000 --- a/gradle/android-realm/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Kotlin example - Status Output… - diff --git a/gradle/android-realm/app/src/main/res/values/styles.xml b/gradle/android-realm/app/src/main/res/values/styles.xml deleted file mode 100755 index ff6c9d2c0f..0000000000 --- a/gradle/android-realm/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/gradle/android-realm/build.gradle b/gradle/android-realm/build.gradle deleted file mode 100644 index 771ff10c8f..0000000000 --- a/gradle/android-realm/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.2' - ext.anko_version = '0.10.0-beta-2' - ext.dagger_version = '2.10' - - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "io.realm:realm-gradle-plugin:3.1.3" - } -} - -allprojects { - repositories { - jcenter() - } -} diff --git a/gradle/android-realm/gradle.properties b/gradle/android-realm/gradle.properties deleted file mode 100644 index 1d3591c8a4..0000000000 --- a/gradle/android-realm/gradle.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file diff --git a/gradle/android-realm/gradle/wrapper/gradle-wrapper.jar b/gradle/android-realm/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 8c0fb64a86..0000000000 Binary files a/gradle/android-realm/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/android-realm/gradle/wrapper/gradle-wrapper.properties b/gradle/android-realm/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index eaba301170..0000000000 --- a/gradle/android-realm/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Apr 10 15:27:10 PDT 2013 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/gradle/android-realm/gradlew b/gradle/android-realm/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/android-realm/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/android-realm/gradlew.bat b/gradle/android-realm/gradlew.bat deleted file mode 100644 index 8a0b282aa6..0000000000 --- a/gradle/android-realm/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/android-realm/settings.gradle b/gradle/android-realm/settings.gradle deleted file mode 100644 index e7b4def49c..0000000000 --- a/gradle/android-realm/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/gradle/android-volley/.gitignore b/gradle/android-volley/.gitignore deleted file mode 100644 index 39fb081a42..0000000000 --- a/gradle/android-volley/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -.externalNativeBuild diff --git a/gradle/android-volley/app/.gitignore b/gradle/android-volley/app/.gitignore deleted file mode 100644 index 796b96d1c4..0000000000 --- a/gradle/android-volley/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/gradle/android-volley/app/build.gradle b/gradle/android-volley/app/build.gradle deleted file mode 100644 index 99abc1fef7..0000000000 --- a/gradle/android-volley/app/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 25 - buildToolsVersion "25.0.3" - defaultConfig { - applicationId "org.example.kotlin.volley" - minSdkVersion 24 - targetSdkVersion 25 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) - compile 'com.android.support:appcompat-v7:25.3.1' - testCompile 'junit:junit:4.12' - compile 'com.android.support.constraint:constraint-layout:1.0.1' - compile 'com.android.support:recyclerview-v7:25.3.1' - compile 'com.android.volley:volley:1.0.0' - compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" -} - -repositories { - mavenCentral() -} diff --git a/gradle/android-volley/app/proguard-rules.pro b/gradle/android-volley/app/proguard-rules.pro deleted file mode 100644 index 9416ac7b76..0000000000 --- a/gradle/android-volley/app/proguard-rules.pro +++ /dev/null @@ -1,25 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/4u7/Library/Android/sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/gradle/android-volley/app/src/androidTest/java/org/example/kotlin/volley/ExampleInstrumentedTest.kt b/gradle/android-volley/app/src/androidTest/java/org/example/kotlin/volley/ExampleInstrumentedTest.kt deleted file mode 100644 index 08e8069e90..0000000000 --- a/gradle/android-volley/app/src/androidTest/java/org/example/kotlin/volley/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.example.kotlin.volley - -import android.content.Context -import android.support.test.InstrumentationRegistry -import android.support.test.runner.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumentation test, which will execute on an Android device. - - * @see [Testing documentation](http://d.android.com/tools/testing) - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - @Throws(Exception::class) - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getTargetContext() - - assertEquals("org.example.kotlin.volley", appContext.packageName) - } -} diff --git a/gradle/android-volley/app/src/main/AndroidManifest.xml b/gradle/android-volley/app/src/main/AndroidManifest.xml deleted file mode 100644 index a8904e75a9..0000000000 --- a/gradle/android-volley/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/App.kt b/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/App.kt deleted file mode 100644 index 200474c25b..0000000000 --- a/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/App.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.example.kotlin.volley - -import android.app.Application - - -class App : Application() { - override fun onCreate() { - super.onCreate() - VolleyService.initialize(this) - } -} \ No newline at end of file diff --git a/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/LruBitmapCache.kt b/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/LruBitmapCache.kt deleted file mode 100644 index 644722667f..0000000000 --- a/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/LruBitmapCache.kt +++ /dev/null @@ -1,28 +0,0 @@ -package org.example.kotlin.volley - -import android.graphics.Bitmap -import android.util.LruCache -import com.android.volley.toolbox.ImageLoader - -class LruBitmapCache constructor(sizeInKB: Int = defaultLruCacheSize): - LruCache(sizeInKB), ImageLoader.ImageCache { - - override fun sizeOf(key: String, value: Bitmap): Int = value.rowBytes * value.height / 1024 - - override fun getBitmap(url: String): Bitmap? { - return get(url) - } - - override fun putBitmap(url: String, bitmap: Bitmap) { - put(url, bitmap) - } - - companion object { - val defaultLruCacheSize: Int - get() { - val maxMemory = (Runtime.getRuntime().maxMemory() / 1024).toInt() - val cacheSize = maxMemory / 8 - return cacheSize - } - } -} \ No newline at end of file diff --git a/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/MainActivity.kt b/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/MainActivity.kt deleted file mode 100644 index 6bbbd5fce2..0000000000 --- a/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/MainActivity.kt +++ /dev/null @@ -1,76 +0,0 @@ -package org.example.kotlin.volley - -import android.os.Bundle -import android.support.v7.app.AppCompatActivity -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView -import android.text.Html -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.TextView -import android.widget.Toast -import com.android.volley.Request -import com.android.volley.Response -import com.android.volley.toolbox.JsonObjectRequest -import com.android.volley.toolbox.NetworkImageView -import org.json.JSONArray -import org.json.JSONObject - - -class MainActivity : AppCompatActivity() { - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - - val newsRecyclerView = findViewById(R.id.news_list) as RecyclerView - newsRecyclerView.layoutManager = LinearLayoutManager(this) - - val url = "http://query.yahooapis.com/v1/public/yql?q=" + - "select * from rss where url='http://rss.news.yahoo.com/rss/topstories'" + - "&format=json" - - val request = JsonObjectRequest(Request.Method.GET, url, null, - Response.Listener { response -> - val news = response - .getJSONObject("query") - .getJSONObject("results") - .getJSONArray("item") - - newsRecyclerView.adapter = NewsAdapter(news) - }, - Response.ErrorListener { - Toast.makeText(this, "That didn't work!", Toast.LENGTH_SHORT).show() - }) - - VolleyService.requestQueue.add(request) - VolleyService.requestQueue.start() - } - - class NewsAdapter(val news: JSONArray) : RecyclerView.Adapter() { - override fun onBindViewHolder(holder: NewsViewHolder, position: Int) { - holder.bind(news.getJSONObject(position), position) - } - - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NewsViewHolder { - val layoutInflater = LayoutInflater.from(parent.context) - val view = layoutInflater.inflate(R.layout.news_item, parent, false) - return NewsViewHolder(view) - } - - override fun getItemCount(): Int = news.length() - } - - class NewsViewHolder(val view: View) : RecyclerView.ViewHolder(view) { - fun bind(newsItem: JSONObject, position: Int) { - val title = view.findViewById(R.id.newsTitle) as TextView - val image = view.findViewById(R.id.image) as NetworkImageView - title.text = Html.fromHtml(newsItem["title"].toString(), 0) - image.setImageUrl( - "http://loremflickr.com/800/600/cat?random=$position", - VolleyService.imageLoader) - } - } -} - diff --git a/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/VolleyService.kt b/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/VolleyService.kt deleted file mode 100644 index 969ec48b1c..0000000000 --- a/gradle/android-volley/app/src/main/java/org/example/kotlin/volley/VolleyService.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.example.kotlin.volley - -import android.content.Context -import com.android.volley.RequestQueue -import com.android.volley.toolbox.ImageLoader -import com.android.volley.toolbox.Volley - - -object VolleyService { - private lateinit var context: Context - - val requestQueue: RequestQueue by lazy { Volley.newRequestQueue(context) } - - val imageLoader: ImageLoader by lazy { ImageLoader(requestQueue, LruBitmapCache()) } - - fun initialize(context: Context) { - this.context = context.applicationContext - } -} \ No newline at end of file diff --git a/gradle/android-volley/app/src/main/res/layout/activity_main.xml b/gradle/android-volley/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index ef58d18ff1..0000000000 --- a/gradle/android-volley/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,7 +0,0 @@ - - \ No newline at end of file diff --git a/gradle/android-volley/app/src/main/res/layout/news_item.xml b/gradle/android-volley/app/src/main/res/layout/news_item.xml deleted file mode 100644 index 3cccbe5716..0000000000 --- a/gradle/android-volley/app/src/main/res/layout/news_item.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/gradle/android-volley/app/src/main/res/mipmap-hdpi/ic_launcher.png b/gradle/android-volley/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bccce..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/gradle/android-volley/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 9a078e3e1a..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-mdpi/ic_launcher.png b/gradle/android-volley/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0cbd3..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/gradle/android-volley/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index efc028a636..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/gradle/android-volley/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0e7b..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/gradle/android-volley/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 3af2608a44..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/gradle/android-volley/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72cdd7..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/gradle/android-volley/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 9bec2e6231..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/gradle/android-volley/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index aee44e1384..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/gradle/android-volley/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 34947cd6bb..0000000000 Binary files a/gradle/android-volley/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/gradle/android-volley/app/src/main/res/values/colors.xml b/gradle/android-volley/app/src/main/res/values/colors.xml deleted file mode 100644 index 3ab3e9cbce..0000000000 --- a/gradle/android-volley/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #3F51B5 - #303F9F - #FF4081 - diff --git a/gradle/android-volley/app/src/main/res/values/strings.xml b/gradle/android-volley/app/src/main/res/values/strings.xml deleted file mode 100644 index 47a0462c01..0000000000 --- a/gradle/android-volley/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Volley - diff --git a/gradle/android-volley/app/src/main/res/values/styles.xml b/gradle/android-volley/app/src/main/res/values/styles.xml deleted file mode 100644 index 5885930df6..0000000000 --- a/gradle/android-volley/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/gradle/android-volley/app/src/test/java/org/example/kotlin/volley/ExampleUnitTest.kt b/gradle/android-volley/app/src/test/java/org/example/kotlin/volley/ExampleUnitTest.kt deleted file mode 100644 index b113d4735e..0000000000 --- a/gradle/android-volley/app/src/test/java/org/example/kotlin/volley/ExampleUnitTest.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.example.kotlin.volley - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - - * @see [Testing documentation](http://d.android.com/tools/testing) - */ -class ExampleUnitTest { - @Test - @Throws(Exception::class) - fun addition_isCorrect() { - assertEquals(4, (2 + 2).toLong()) - } -} \ No newline at end of file diff --git a/gradle/android-volley/build.gradle b/gradle/android-volley/build.gradle deleted file mode 100644 index f242fd09da..0000000000 --- a/gradle/android-volley/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - ext.kotlin_version = '1.1.2-3' - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.4.0-alpha7' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - jcenter() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/gradle/android-volley/gradle.properties b/gradle/android-volley/gradle.properties deleted file mode 100644 index aac7c9b461..0000000000 --- a/gradle/android-volley/gradle.properties +++ /dev/null @@ -1,17 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true diff --git a/gradle/android-volley/gradle/wrapper/gradle-wrapper.jar b/gradle/android-volley/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372aef5e..0000000000 Binary files a/gradle/android-volley/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/android-volley/gradle/wrapper/gradle-wrapper.properties b/gradle/android-volley/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index d609c6b77f..0000000000 --- a/gradle/android-volley/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon May 08 14:36:40 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip diff --git a/gradle/android-volley/gradlew b/gradle/android-volley/gradlew deleted file mode 100755 index 9d82f78915..0000000000 --- a/gradle/android-volley/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/android-volley/gradlew.bat b/gradle/android-volley/gradlew.bat deleted file mode 100644 index 8a0b282aa6..0000000000 --- a/gradle/android-volley/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/android-volley/settings.gradle b/gradle/android-volley/settings.gradle deleted file mode 100644 index e7b4def49c..0000000000 --- a/gradle/android-volley/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/gradle/dokka-gradle-example/Module.md b/gradle/dokka-gradle-example/Module.md deleted file mode 100644 index 8895b1bb50..0000000000 --- a/gradle/dokka-gradle-example/Module.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module dokka-gradle-example - -This is an example of how you can write module documentation with Dokka. - -# Package demo - -This package contains a few examples of Dokka usage. diff --git a/gradle/dokka-gradle-example/build.gradle b/gradle/dokka-gradle-example/build.gradle deleted file mode 100644 index 71b3e29e59..0000000000 --- a/gradle/dokka-gradle-example/build.gradle +++ /dev/null @@ -1,52 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.4-3' - - repositories { - mavenLocal() - mavenCentral() - jcenter() - maven { - url 'https://dl.bintray.com/kotlin/kotlin-eap' - } - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.9" - } -} - -apply plugin: 'kotlin' -apply plugin: 'org.jetbrains.dokka' - -sourceCompatibility = 1.5 - -repositories { - mavenCentral() - maven { - url 'https://dl.bintray.com/kotlin/kotlin-eap' - } -} - -dependencies { - testCompile group: 'junit', name: 'junit', version: '4.12' - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" -} -sourceSets { - main.java.srcDirs += 'src/main/kotlin' -} - -dokka { - includes = ['Module.md'] - - linkMapping { - dir = "src/main/kotlin" - url = "https://github.com/JetBrains/kotlin-examples/tree/master/gradle/dokka-gradle-example/src/main/kotlin" - suffix = "#L" - } -} - -task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) { - outputFormat = "javadoc" - outputDirectory = "$buildDir/dokkaJavadoc" -} diff --git a/gradle/dokka-gradle-example/gradle/wrapper/gradle-wrapper.jar b/gradle/dokka-gradle-example/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 30d399d8d2..0000000000 Binary files a/gradle/dokka-gradle-example/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/dokka-gradle-example/gradle/wrapper/gradle-wrapper.properties b/gradle/dokka-gradle-example/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index bb9d571f82..0000000000 --- a/gradle/dokka-gradle-example/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon Nov 09 13:59:33 CET 2015 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/gradle/dokka-gradle-example/gradlew b/gradle/dokka-gradle-example/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/dokka-gradle-example/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/dokka-gradle-example/gradlew.bat b/gradle/dokka-gradle-example/gradlew.bat deleted file mode 100644 index 8a0b282aa6..0000000000 --- a/gradle/dokka-gradle-example/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/dokka-gradle-example/settings.gradle b/gradle/dokka-gradle-example/settings.gradle deleted file mode 100644 index afed18981f..0000000000 --- a/gradle/dokka-gradle-example/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'dokka-gradle-example' - diff --git a/gradle/dokka-gradle-example/src/main/kotlin/demo/HelloWorld.kt b/gradle/dokka-gradle-example/src/main/kotlin/demo/HelloWorld.kt deleted file mode 100644 index 172e18f7cf..0000000000 --- a/gradle/dokka-gradle-example/src/main/kotlin/demo/HelloWorld.kt +++ /dev/null @@ -1,20 +0,0 @@ -package demo - -/** - * This class supports greeting people by name. - * - * @property name The name of the person to be greeted. - */ -class Greeter(val name: String) { - - /** - * Prints the greeting to the standard output. - */ - fun greet() { - println("Hello $name!") - } -} - -fun main(args: Array) { - Greeter(args[0]).greet() -} diff --git a/gradle/hello-world/.gitignore b/gradle/hello-world/.gitignore deleted file mode 100644 index 0c9d47c18a..0000000000 --- a/gradle/hello-world/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -build -.gradle -.idea -*.iml diff --git a/gradle/hello-world/build.gradle b/gradle/hello-world/build.gradle deleted file mode 100644 index 48e4a775a1..0000000000 --- a/gradle/hello-world/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.4-3' - repositories { - mavenCentral() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'application' - -mainClassName = 'demo.HelloWorldKt' - -defaultTasks 'run' - -repositories { - mavenCentral() -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile 'junit:junit:4.11' - testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" -} - -task wrapper(type: Wrapper) { - gradleVersion = "4.1" -} diff --git a/gradle/hello-world/gradle/wrapper/gradle-wrapper.jar b/gradle/hello-world/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 3c7abdf127..0000000000 Binary files a/gradle/hello-world/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/hello-world/gradle/wrapper/gradle-wrapper.properties b/gradle/hello-world/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2f0ca00333..0000000000 --- a/gradle/hello-world/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon Oct 26 12:25:13 CET 2015 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/gradle/hello-world/gradlew b/gradle/hello-world/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/hello-world/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/hello-world/gradlew.bat b/gradle/hello-world/gradlew.bat deleted file mode 100644 index 8a0b282aa6..0000000000 --- a/gradle/hello-world/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/hello-world/src/main/kotlin/demo/helloWorld.kt b/gradle/hello-world/src/main/kotlin/demo/helloWorld.kt deleted file mode 100644 index e4f2c55d96..0000000000 --- a/gradle/hello-world/src/main/kotlin/demo/helloWorld.kt +++ /dev/null @@ -1,13 +0,0 @@ -package demo - -fun getGreeting(): String { - val words = mutableListOf() - words.add("Hello,") - words.add("world!") - - return words.joinToString(separator = " ") -} - -fun main(args: Array) { - println(getGreeting()) -} diff --git a/gradle/hello-world/src/test/kotlin/demo/tests.kt b/gradle/hello-world/src/test/kotlin/demo/tests.kt deleted file mode 100644 index 0213ac15f3..0000000000 --- a/gradle/hello-world/src/test/kotlin/demo/tests.kt +++ /dev/null @@ -1,10 +0,0 @@ -package demo - -import kotlin.test.assertEquals -import org.junit.Test - -class TestSource { - @Test fun f() { - assertEquals("Hello, world!", getGreeting()) - } -} diff --git a/gradle/js-dce/.gitignore b/gradle/js-dce/.gitignore deleted file mode 100644 index 183a9661cb..0000000000 --- a/gradle/js-dce/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/.idea -/*.iml -/node_modules -/build \ No newline at end of file diff --git a/gradle/js-dce/README.md b/gradle/js-dce/README.md deleted file mode 100644 index edeaf63890..0000000000 --- a/gradle/js-dce/README.md +++ /dev/null @@ -1,5 +0,0 @@ -This sample project shows how to use Kotlin DCE and webpack to get a small bundle. - -To build the project, simply run `./gradlew build`, -then open `index.html` in the browser. - \ No newline at end of file diff --git a/gradle/js-dce/build.gradle b/gradle/js-dce/build.gradle deleted file mode 100644 index c6aaad4634..0000000000 --- a/gradle/js-dce/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.4-eap-33' - - repositories { - maven { url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' } - maven { url "https://plugins.gradle.org/m2/" } - mavenCentral() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0' - } -} - -apply plugin: 'kotlin2js' -apply plugin: 'kotlin-dce-js' -apply plugin: 'com.moowork.node' - -node { - download = true -} - -repositories { - maven { url 'http://dl.bintray.com/kotlin/kotlin-eap-1.1' } - mavenCentral() -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" -} - -compileKotlin2Js.kotlinOptions.moduleKind = "umd" - -task buildBundle(type: NpmTask, dependsOn: [npmInstall, runDceKotlinJs]) { - args = ["run", "bundle"] -} - -assemble.dependsOn buildBundle \ No newline at end of file diff --git a/gradle/js-dce/gradle/wrapper/gradle-wrapper.jar b/gradle/js-dce/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 44b8849c6e..0000000000 Binary files a/gradle/js-dce/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/js-dce/gradle/wrapper/gradle-wrapper.properties b/gradle/js-dce/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 845dd5e6bb..0000000000 --- a/gradle/js-dce/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon Jul 31 12:54:11 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-rc-2-bin.zip diff --git a/gradle/js-dce/gradlew b/gradle/js-dce/gradlew deleted file mode 100755 index 4453ccea33..0000000000 --- a/gradle/js-dce/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save ( ) { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/gradle/js-dce/gradlew.bat b/gradle/js-dce/gradlew.bat deleted file mode 100644 index f9553162f1..0000000000 --- a/gradle/js-dce/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/js-dce/index.html b/gradle/js-dce/index.html deleted file mode 100644 index 018a5227f7..0000000000 --- a/gradle/js-dce/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Kotlin/JS ‘Hello, World’ with DCE - - - - - \ No newline at end of file diff --git a/gradle/js-dce/package.json b/gradle/js-dce/package.json deleted file mode 100644 index 27f3c4f3f4..0000000000 --- a/gradle/js-dce/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "dependencies": { - "webpack": "3.4.1" - }, - "scripts": { - "bundle" : "webpack" - } -} \ No newline at end of file diff --git a/gradle/js-dce/settings.gradle b/gradle/js-dce/settings.gradle deleted file mode 100644 index ea1e4fd743..0000000000 --- a/gradle/js-dce/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'kotlin-dce-example' - diff --git a/gradle/js-dce/src/main/kotlin/Hello.kt b/gradle/js-dce/src/main/kotlin/Hello.kt deleted file mode 100644 index 04556dfbd8..0000000000 --- a/gradle/js-dce/src/main/kotlin/Hello.kt +++ /dev/null @@ -1,10 +0,0 @@ -import kotlin.browser.document -import kotlin.browser.window - -fun main(args: Array) { - window.onload = { - document.body!!.append(document.createElement("div").apply { - textContent = "Hello, world!" - }) - } -} \ No newline at end of file diff --git a/gradle/js-dce/webpack.config.js b/gradle/js-dce/webpack.config.js deleted file mode 100644 index 59b90bd382..0000000000 --- a/gradle/js-dce/webpack.config.js +++ /dev/null @@ -1,18 +0,0 @@ -var webpack = require("webpack"); -var path = require("path"); - -module.exports = { - entry: path.resolve(__dirname, "build/classes/main/min/kotlin-dce-example_main.js"), - output: { - path: path.resolve(__dirname, "build"), - filename: "bundle.js" - }, - resolve: { - alias: { - kotlin: path.resolve(__dirname, "build/classes/main/min/kotlin.js") - } - }, - plugins: [ - new webpack.optimize.UglifyJsPlugin() - ] -}; \ No newline at end of file diff --git a/gradle/js-tests/.gitignore b/gradle/js-tests/.gitignore deleted file mode 100644 index c556c5f495..0000000000 --- a/gradle/js-tests/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -build -.gradle -.idea -*.iml -node_modules diff --git a/gradle/js-tests/README.md b/gradle/js-tests/README.md deleted file mode 100644 index 907b0edd3e..0000000000 --- a/gradle/js-tests/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Sample projects using various test frameworks. Requires Kotlin version 1.1.4-eap-33 or later. - -In order to run the tests run `./gradlew test` in the corresponding folder. diff --git a/gradle/js-tests/frontend-plugin/README.md b/gradle/js-tests/frontend-plugin/README.md deleted file mode 100644 index 5ccdc0cd7c..0000000000 --- a/gradle/js-tests/frontend-plugin/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Sample project for the [kotlin-frontend-plugin](https://github.com/Kotlin/kotlin-frontend-plugin). -Uses [QUnit](http://qunitjs.com/) unit testing framework with [Karma](https://karma-runner.github.io/1.0/index.html) runner. - diff --git a/gradle/js-tests/frontend-plugin/build.gradle b/gradle/js-tests/frontend-plugin/build.gradle deleted file mode 100644 index 1d5166ec43..0000000000 --- a/gradle/js-tests/frontend-plugin/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -buildscript { - repositories { - jcenter() - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' } - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-eap-33' - classpath "org.jetbrains.kotlin:kotlin-frontend-plugin:0.0.26" - } -} - -apply plugin: 'kotlin2js' -apply plugin: 'org.jetbrains.kotlin.frontend' - -repositories { - jcenter() - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-js" - compile "org.jetbrains.kotlin:kotlin-test-js" // for now only compile configuration is supported -} - -kotlinFrontend { - downloadNodeJsVersion = "latest" - - npm { - devDependency("karma") - } - - webpackBundle { - bundleName = "main" - contentPath = file('src/main/web') - } -} - -[compileKotlin2Js, compileTestKotlin2Js]*.configure { - kotlinOptions.moduleKind = "commonjs" -} diff --git a/gradle/js-tests/frontend-plugin/gradle/wrapper/gradle-wrapper.jar b/gradle/js-tests/frontend-plugin/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 085a1cdc27..0000000000 Binary files a/gradle/js-tests/frontend-plugin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/js-tests/frontend-plugin/gradle/wrapper/gradle-wrapper.properties b/gradle/js-tests/frontend-plugin/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index da0e5c9b16..0000000000 --- a/gradle/js-tests/frontend-plugin/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 20 14:44:56 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip diff --git a/gradle/js-tests/frontend-plugin/gradlew b/gradle/js-tests/frontend-plugin/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/js-tests/frontend-plugin/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/js-tests/frontend-plugin/gradlew.bat b/gradle/js-tests/frontend-plugin/gradlew.bat deleted file mode 100755 index 8a0b282aa6..0000000000 --- a/gradle/js-tests/frontend-plugin/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/js-tests/frontend-plugin/src/main/kotlin/Main.kt b/gradle/js-tests/frontend-plugin/src/main/kotlin/Main.kt deleted file mode 100644 index 1b2fec59b6..0000000000 --- a/gradle/js-tests/frontend-plugin/src/main/kotlin/Main.kt +++ /dev/null @@ -1 +0,0 @@ -fun foo() = 10 \ No newline at end of file diff --git a/gradle/js-tests/frontend-plugin/src/test/kotlin/MainTest.kt b/gradle/js-tests/frontend-plugin/src/test/kotlin/MainTest.kt deleted file mode 100644 index 051b27f4de..0000000000 --- a/gradle/js-tests/frontend-plugin/src/test/kotlin/MainTest.kt +++ /dev/null @@ -1,19 +0,0 @@ -import kotlin.test.* - -class SimpleTest { - - @Test fun testFoo() { - assertEquals(10, foo()) - } - - @Ignore @Test fun testFooWrong() { - assertEquals(20, foo()) - } -} - -@Ignore -class TestTest { - @Test fun emptyTest() { - // Will not run - } -} diff --git a/gradle/js-tests/jasmine/README.md b/gradle/js-tests/jasmine/README.md deleted file mode 100644 index 24039f53c2..0000000000 --- a/gradle/js-tests/jasmine/README.md +++ /dev/null @@ -1 +0,0 @@ -Sample project for [Jasmine](https://jasmine.github.io/) unit testing framework. diff --git a/gradle/js-tests/jasmine/build.gradle b/gradle/js-tests/jasmine/build.gradle deleted file mode 100644 index bff40d7f53..0000000000 --- a/gradle/js-tests/jasmine/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -buildscript { - repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-eap-33' - classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0' - } -} - -apply plugin: 'kotlin2js' -apply plugin: 'com.moowork.node' - -repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-js" - testCompile "org.jetbrains.kotlin:kotlin-test-js" -} - -[compileKotlin2Js, compileTestKotlin2Js]*.configure { - kotlinOptions.moduleKind = "commonjs" -} - -task populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) { - from compileKotlin2Js.destinationDir - - configurations.testCompile.each { - from zipTree(it.absolutePath).matching { include '*.js' } - } - - into "${buildDir}/node_modules" -} - -node { - download = true -} - -task installJasmine(type: NpmTask) { - args = ['install', 'jasmine'] -} - -task runJasmine(type: NodeTask, dependsOn: [compileTestKotlin2Js, populateNodeModules, installJasmine]) { - script = file('node_modules/jasmine/bin/jasmine.js') - args = [compileTestKotlin2Js.outputFile] -} - -test.dependsOn runJasmine diff --git a/gradle/js-tests/jasmine/gradle/wrapper/gradle-wrapper.jar b/gradle/js-tests/jasmine/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 085a1cdc27..0000000000 Binary files a/gradle/js-tests/jasmine/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/js-tests/jasmine/gradle/wrapper/gradle-wrapper.properties b/gradle/js-tests/jasmine/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index da0e5c9b16..0000000000 --- a/gradle/js-tests/jasmine/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 20 14:44:56 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip diff --git a/gradle/js-tests/jasmine/gradlew b/gradle/js-tests/jasmine/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/js-tests/jasmine/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/js-tests/jasmine/gradlew.bat b/gradle/js-tests/jasmine/gradlew.bat deleted file mode 100755 index 8a0b282aa6..0000000000 --- a/gradle/js-tests/jasmine/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/js-tests/jasmine/src/main/kotlin/Main.kt b/gradle/js-tests/jasmine/src/main/kotlin/Main.kt deleted file mode 100644 index 1b2fec59b6..0000000000 --- a/gradle/js-tests/jasmine/src/main/kotlin/Main.kt +++ /dev/null @@ -1 +0,0 @@ -fun foo() = 10 \ No newline at end of file diff --git a/gradle/js-tests/jasmine/src/test/kotlin/MainTest.kt b/gradle/js-tests/jasmine/src/test/kotlin/MainTest.kt deleted file mode 100644 index 051b27f4de..0000000000 --- a/gradle/js-tests/jasmine/src/test/kotlin/MainTest.kt +++ /dev/null @@ -1,19 +0,0 @@ -import kotlin.test.* - -class SimpleTest { - - @Test fun testFoo() { - assertEquals(10, foo()) - } - - @Ignore @Test fun testFooWrong() { - assertEquals(20, foo()) - } -} - -@Ignore -class TestTest { - @Test fun emptyTest() { - // Will not run - } -} diff --git a/gradle/js-tests/jest/README.md b/gradle/js-tests/jest/README.md deleted file mode 100644 index 1619c9b7c6..0000000000 --- a/gradle/js-tests/jest/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Sample project for [Jest](https://facebook.github.io/jest/) unit testing framework. -This example also shows how make `npm test` launch the tests. - -Beware that current version of Jest doesn't work well when package.json is absent. diff --git a/gradle/js-tests/jest/build.gradle b/gradle/js-tests/jest/build.gradle deleted file mode 100644 index 8d2cd98257..0000000000 --- a/gradle/js-tests/jest/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -buildscript { - repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-eap-33' - classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0' - } -} - -apply plugin: 'kotlin2js' -apply plugin: 'com.moowork.node' - -repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-js" - testCompile "org.jetbrains.kotlin:kotlin-test-js" -} - -[compileKotlin2Js, compileTestKotlin2Js]*.configure { - kotlinOptions.moduleKind = "commonjs" -} - -task populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) { - from compileKotlin2Js.destinationDir - - configurations.testCompile.each { - from zipTree(it.absolutePath).matching { include '*.js' } - } - - into "${buildDir}/node_modules" -} - -node { - download = true -} - -task installJest(type: NpmTask) { - args = ['install', 'jest'] -} - -task runJest(type: NodeTask, dependsOn: [compileTestKotlin2Js, populateNodeModules, installJest]) { - script = file('node_modules/jest/bin/jest.js') - args = [compileTestKotlin2Js.outputFile] -} - -test.dependsOn runJest diff --git a/gradle/js-tests/jest/gradle/wrapper/gradle-wrapper.jar b/gradle/js-tests/jest/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 085a1cdc27..0000000000 Binary files a/gradle/js-tests/jest/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/js-tests/jest/gradle/wrapper/gradle-wrapper.properties b/gradle/js-tests/jest/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index da0e5c9b16..0000000000 --- a/gradle/js-tests/jest/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 20 14:44:56 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip diff --git a/gradle/js-tests/jest/gradlew b/gradle/js-tests/jest/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/js-tests/jest/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/js-tests/jest/gradlew.bat b/gradle/js-tests/jest/gradlew.bat deleted file mode 100755 index 8a0b282aa6..0000000000 --- a/gradle/js-tests/jest/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/js-tests/jest/package.json b/gradle/js-tests/jest/package.json deleted file mode 100644 index 469bde7cc5..0000000000 --- a/gradle/js-tests/jest/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scripts": { - "test": "./gradlew test" - }, - "jest": { - "testRegex": "_test\\.js$" - } -} diff --git a/gradle/js-tests/jest/src/main/kotlin/Main.kt b/gradle/js-tests/jest/src/main/kotlin/Main.kt deleted file mode 100644 index 1b2fec59b6..0000000000 --- a/gradle/js-tests/jest/src/main/kotlin/Main.kt +++ /dev/null @@ -1 +0,0 @@ -fun foo() = 10 \ No newline at end of file diff --git a/gradle/js-tests/jest/src/test/kotlin/MainTest.kt b/gradle/js-tests/jest/src/test/kotlin/MainTest.kt deleted file mode 100644 index 051b27f4de..0000000000 --- a/gradle/js-tests/jest/src/test/kotlin/MainTest.kt +++ /dev/null @@ -1,19 +0,0 @@ -import kotlin.test.* - -class SimpleTest { - - @Test fun testFoo() { - assertEquals(10, foo()) - } - - @Ignore @Test fun testFooWrong() { - assertEquals(20, foo()) - } -} - -@Ignore -class TestTest { - @Test fun emptyTest() { - // Will not run - } -} diff --git a/gradle/js-tests/karma/README.md b/gradle/js-tests/karma/README.md deleted file mode 100644 index c3ef5167c5..0000000000 --- a/gradle/js-tests/karma/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Sample project for the [Karma](https://karma-runner.github.io/1.0/index.html) test runner. -The unit testing framework used in this example is [Mocha](https://mochajs.org/). diff --git a/gradle/js-tests/karma/build.gradle b/gradle/js-tests/karma/build.gradle deleted file mode 100644 index ae863230dd..0000000000 --- a/gradle/js-tests/karma/build.gradle +++ /dev/null @@ -1,57 +0,0 @@ -buildscript { - repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-eap-33' - classpath "gradle.plugin.com.craigburke.gradle:karma-gradle:1.4.4" - } -} - -apply plugin: 'kotlin2js' -apply plugin: 'com.craigburke.karma' - -repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-js" - testCompile "org.jetbrains.kotlin:kotlin-test-js" -} - -def libDir = "$buildDir/lib" -def compileOutput = compileKotlin2Js.outputFile -def testOutput = compileTestKotlin2Js.outputFile - -task populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) { - configurations.testCompile.each { - from zipTree(it.absolutePath).matching { include '*.js' } - } - - into libDir -} - -karma { - dependencies(['mocha']) - - frameworks = ['mocha'] - browsers = ['PhantomJS'] - - files = [ - "$libDir/kotlin.js", - "$libDir/*.js", - compileOutput, - testOutput - ] -} - -karmaRun { - dependsOn compileTestKotlin2Js - dependsOn populateNodeModules -} - -test.dependsOn karmaRun -clean.dependsOn karmaClean - diff --git a/gradle/js-tests/karma/gradle/wrapper/gradle-wrapper.jar b/gradle/js-tests/karma/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 085a1cdc27..0000000000 Binary files a/gradle/js-tests/karma/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/js-tests/karma/gradle/wrapper/gradle-wrapper.properties b/gradle/js-tests/karma/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index da0e5c9b16..0000000000 --- a/gradle/js-tests/karma/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 20 14:44:56 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip diff --git a/gradle/js-tests/karma/gradlew b/gradle/js-tests/karma/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/js-tests/karma/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/js-tests/karma/gradlew.bat b/gradle/js-tests/karma/gradlew.bat deleted file mode 100755 index 8a0b282aa6..0000000000 --- a/gradle/js-tests/karma/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/js-tests/karma/src/main/kotlin/Main.kt b/gradle/js-tests/karma/src/main/kotlin/Main.kt deleted file mode 100644 index 1b2fec59b6..0000000000 --- a/gradle/js-tests/karma/src/main/kotlin/Main.kt +++ /dev/null @@ -1 +0,0 @@ -fun foo() = 10 \ No newline at end of file diff --git a/gradle/js-tests/karma/src/test/kotlin/MainTest.kt b/gradle/js-tests/karma/src/test/kotlin/MainTest.kt deleted file mode 100644 index 051b27f4de..0000000000 --- a/gradle/js-tests/karma/src/test/kotlin/MainTest.kt +++ /dev/null @@ -1,19 +0,0 @@ -import kotlin.test.* - -class SimpleTest { - - @Test fun testFoo() { - assertEquals(10, foo()) - } - - @Ignore @Test fun testFooWrong() { - assertEquals(20, foo()) - } -} - -@Ignore -class TestTest { - @Test fun emptyTest() { - // Will not run - } -} diff --git a/gradle/js-tests/mocha/README.md b/gradle/js-tests/mocha/README.md deleted file mode 100644 index 93a291f622..0000000000 --- a/gradle/js-tests/mocha/README.md +++ /dev/null @@ -1 +0,0 @@ -Sample project for [Mocha](https://mochajs.org/) unit testing framework. diff --git a/gradle/js-tests/mocha/build.gradle b/gradle/js-tests/mocha/build.gradle deleted file mode 100644 index 3d7657f686..0000000000 --- a/gradle/js-tests/mocha/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -buildscript { - repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-eap-33' - classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0' - } -} - -apply plugin: 'kotlin2js' -apply plugin: 'com.moowork.node' - -repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-js" - testCompile "org.jetbrains.kotlin:kotlin-test-js" -} - -[compileKotlin2Js, compileTestKotlin2Js]*.configure { - kotlinOptions.moduleKind = "commonjs" -} - -task populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) { - from compileKotlin2Js.destinationDir - - configurations.testCompile.each { - from zipTree(it.absolutePath).matching { include '*.js' } - } - - into "${buildDir}/node_modules" -} - -node { - download = true -} - -task installMocha(type: NpmTask) { - args = ['install', 'mocha'] -} - -task runMocha(type: NodeTask, dependsOn: [compileTestKotlin2Js, populateNodeModules, installMocha]) { - script = file('node_modules/mocha/bin/mocha') - args = [compileTestKotlin2Js.outputFile] -} - -test.dependsOn runMocha diff --git a/gradle/js-tests/mocha/gradle/wrapper/gradle-wrapper.jar b/gradle/js-tests/mocha/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 085a1cdc27..0000000000 Binary files a/gradle/js-tests/mocha/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/js-tests/mocha/gradle/wrapper/gradle-wrapper.properties b/gradle/js-tests/mocha/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index da0e5c9b16..0000000000 --- a/gradle/js-tests/mocha/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 20 14:44:56 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip diff --git a/gradle/js-tests/mocha/gradlew b/gradle/js-tests/mocha/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/js-tests/mocha/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/js-tests/mocha/gradlew.bat b/gradle/js-tests/mocha/gradlew.bat deleted file mode 100755 index 8a0b282aa6..0000000000 --- a/gradle/js-tests/mocha/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/js-tests/mocha/src/main/kotlin/Main.kt b/gradle/js-tests/mocha/src/main/kotlin/Main.kt deleted file mode 100644 index 1b2fec59b6..0000000000 --- a/gradle/js-tests/mocha/src/main/kotlin/Main.kt +++ /dev/null @@ -1 +0,0 @@ -fun foo() = 10 \ No newline at end of file diff --git a/gradle/js-tests/mocha/src/test/kotlin/MainTest.kt b/gradle/js-tests/mocha/src/test/kotlin/MainTest.kt deleted file mode 100644 index 051b27f4de..0000000000 --- a/gradle/js-tests/mocha/src/test/kotlin/MainTest.kt +++ /dev/null @@ -1,19 +0,0 @@ -import kotlin.test.* - -class SimpleTest { - - @Test fun testFoo() { - assertEquals(10, foo()) - } - - @Ignore @Test fun testFooWrong() { - assertEquals(20, foo()) - } -} - -@Ignore -class TestTest { - @Test fun emptyTest() { - // Will not run - } -} diff --git a/gradle/js-tests/qunit/README.md b/gradle/js-tests/qunit/README.md deleted file mode 100644 index 2aaae297fc..0000000000 --- a/gradle/js-tests/qunit/README.md +++ /dev/null @@ -1 +0,0 @@ -Sample project for [QUnit](http://qunitjs.com) unit testing framework. diff --git a/gradle/js-tests/qunit/build.gradle b/gradle/js-tests/qunit/build.gradle deleted file mode 100644 index 21598cbc2e..0000000000 --- a/gradle/js-tests/qunit/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -buildscript { - repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-eap-33' - classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0' - } -} - -apply plugin: 'kotlin2js' -apply plugin: 'com.moowork.node' - -repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-js" - testCompile "org.jetbrains.kotlin:kotlin-test-js" -} - -[compileKotlin2Js, compileTestKotlin2Js]*.configure { - kotlinOptions.moduleKind = "commonjs" -} - -task populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) { - from compileKotlin2Js.destinationDir - - configurations.testCompile.each { - from zipTree(it.absolutePath).matching { include '*.js' } - } - - into "${buildDir}/node_modules" -} - -node { - download = true -} - -task installQunit(type: NpmTask) { - args = ['install', 'qunitjs'] -} - -task runQunit(type: NodeTask, dependsOn: [compileTestKotlin2Js, populateNodeModules, installQunit]) { - script = file('node_modules/qunitjs/bin/qunit') - args = [projectDir.toPath().relativize(file(compileTestKotlin2Js.outputFile).toPath())] -} - -test.dependsOn runQunit diff --git a/gradle/js-tests/qunit/gradle/wrapper/gradle-wrapper.jar b/gradle/js-tests/qunit/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 085a1cdc27..0000000000 Binary files a/gradle/js-tests/qunit/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/js-tests/qunit/gradle/wrapper/gradle-wrapper.properties b/gradle/js-tests/qunit/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index da0e5c9b16..0000000000 --- a/gradle/js-tests/qunit/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 20 14:44:56 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip diff --git a/gradle/js-tests/qunit/gradlew b/gradle/js-tests/qunit/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/js-tests/qunit/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/js-tests/qunit/gradlew.bat b/gradle/js-tests/qunit/gradlew.bat deleted file mode 100755 index 8a0b282aa6..0000000000 --- a/gradle/js-tests/qunit/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/js-tests/qunit/src/main/kotlin/Main.kt b/gradle/js-tests/qunit/src/main/kotlin/Main.kt deleted file mode 100644 index 1b2fec59b6..0000000000 --- a/gradle/js-tests/qunit/src/main/kotlin/Main.kt +++ /dev/null @@ -1 +0,0 @@ -fun foo() = 10 \ No newline at end of file diff --git a/gradle/js-tests/qunit/src/test/kotlin/MainTest.kt b/gradle/js-tests/qunit/src/test/kotlin/MainTest.kt deleted file mode 100644 index 051b27f4de..0000000000 --- a/gradle/js-tests/qunit/src/test/kotlin/MainTest.kt +++ /dev/null @@ -1,19 +0,0 @@ -import kotlin.test.* - -class SimpleTest { - - @Test fun testFoo() { - assertEquals(10, foo()) - } - - @Ignore @Test fun testFooWrong() { - assertEquals(20, foo()) - } -} - -@Ignore -class TestTest { - @Test fun emptyTest() { - // Will not run - } -} diff --git a/gradle/js-tests/tape/README.md b/gradle/js-tests/tape/README.md deleted file mode 100644 index 810f794a79..0000000000 --- a/gradle/js-tests/tape/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Sample project for [Tape](ttps://github.com/substack/tape) unit testing framework. -It is not supported out of the box, so it requires a custom `tape-plugin.js`. - -This example shows how to configure a custom unit testing framework to run Kotlin tests. diff --git a/gradle/js-tests/tape/build.gradle b/gradle/js-tests/tape/build.gradle deleted file mode 100644 index 5c78af7f98..0000000000 --- a/gradle/js-tests/tape/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -buildscript { - repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.4-eap-33' - classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0' - } -} - -apply plugin: 'kotlin2js' -apply plugin: 'com.moowork.node' - -repositories { - maven { url 'https://dl.bintray.com/kotlin/kotlin-eap-1.1' } -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-js" - testCompile "org.jetbrains.kotlin:kotlin-test-js" -} - -[compileKotlin2Js, compileTestKotlin2Js]*.configure { - kotlinOptions.moduleKind = "commonjs" -} - -task populateNodeModules(type: Copy) { - from compileKotlin2Js.destinationDir - - configurations.testCompile.each { from zipTree(it.absolutePath) } - include '*.js' - into "${buildDir}/node_modules" -} - -node { - download = true -} - -task installTape(type: NpmTask) { - args = ['install', 'tape'] -} - -task testTape(type: NodeTask, dependsOn: [compileTestKotlin2Js, populateNodeModules, installTape]) { - script = file('node_modules/tape/bin/tape') - args = ['tape-plugin.js', compileTestKotlin2Js.outputFile] -} - -test.dependsOn testTape diff --git a/gradle/js-tests/tape/gradle/wrapper/gradle-wrapper.jar b/gradle/js-tests/tape/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 085a1cdc27..0000000000 Binary files a/gradle/js-tests/tape/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/js-tests/tape/gradle/wrapper/gradle-wrapper.properties b/gradle/js-tests/tape/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index da0e5c9b16..0000000000 --- a/gradle/js-tests/tape/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 20 14:44:56 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip diff --git a/gradle/js-tests/tape/gradlew b/gradle/js-tests/tape/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/js-tests/tape/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/js-tests/tape/gradlew.bat b/gradle/js-tests/tape/gradlew.bat deleted file mode 100755 index 8a0b282aa6..0000000000 --- a/gradle/js-tests/tape/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/js-tests/tape/src/main/kotlin/Main.kt b/gradle/js-tests/tape/src/main/kotlin/Main.kt deleted file mode 100644 index 1b2fec59b6..0000000000 --- a/gradle/js-tests/tape/src/main/kotlin/Main.kt +++ /dev/null @@ -1 +0,0 @@ -fun foo() = 10 \ No newline at end of file diff --git a/gradle/js-tests/tape/src/test/kotlin/MainTest.kt b/gradle/js-tests/tape/src/test/kotlin/MainTest.kt deleted file mode 100644 index 051b27f4de..0000000000 --- a/gradle/js-tests/tape/src/test/kotlin/MainTest.kt +++ /dev/null @@ -1,19 +0,0 @@ -import kotlin.test.* - -class SimpleTest { - - @Test fun testFoo() { - assertEquals(10, foo()) - } - - @Ignore @Test fun testFooWrong() { - assertEquals(20, foo()) - } -} - -@Ignore -class TestTest { - @Test fun emptyTest() { - // Will not run - } -} diff --git a/gradle/js-tests/tape/tape-plugin.js b/gradle/js-tests/tape/tape-plugin.js deleted file mode 100644 index cb191d8888..0000000000 --- a/gradle/js-tests/tape/tape-plugin.js +++ /dev/null @@ -1,36 +0,0 @@ -var tape = require('tape'); -var kotlin_test = require('./build/node_modules/kotlin-test.js'); - -var suiteContext = { - test: tape -}; -var hasTests = false; - -kotlin_test.setAdapter({ - suite: function (name, ignored, fn) { - suiteContext.test(name, { skip: ignored }, function(t) { - var prevContext = suiteContext; - suiteContext = t; - hasTests = false; - fn(); - suiteContext = prevContext; - if (!hasTests) { - t.pass('fake suite assert'); - } - t.end(); - }); - }, - - test: function (name, ignored, fn) { - hasTests = true; - suiteContext.test(name, { skip: ignored }, function (t) { - try { - fn(); - } catch (e) { - t.ok(false, e.message); - } - t.pass('fake assert'); - t.end(); - }); - } -}); diff --git a/gradle/kotlin-code-generation/.gitignore b/gradle/kotlin-code-generation/.gitignore deleted file mode 100644 index e02bde6eda..0000000000 --- a/gradle/kotlin-code-generation/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea -.DS_Store -/build -/example/build -/annotation-processor/build -/captures \ No newline at end of file diff --git a/gradle/kotlin-code-generation/annotation-processor/build.gradle b/gradle/kotlin-code-generation/annotation-processor/build.gradle deleted file mode 100644 index b1e6d0bae1..0000000000 --- a/gradle/kotlin-code-generation/annotation-processor/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -apply plugin: 'kotlin' - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - compile 'com.github.yanex:takenoko:0.1' -} \ No newline at end of file diff --git a/gradle/kotlin-code-generation/annotation-processor/src/main/java/TestAnnotationProcessor.kt b/gradle/kotlin-code-generation/annotation-processor/src/main/java/TestAnnotationProcessor.kt deleted file mode 100644 index 2523a5af69..0000000000 --- a/gradle/kotlin-code-generation/annotation-processor/src/main/java/TestAnnotationProcessor.kt +++ /dev/null @@ -1,58 +0,0 @@ -package org.kotlin.annotationProcessor - -import org.yanex.takenoko.* -import java.io.File -import javax.annotation.processing.* -import javax.lang.model.SourceVersion -import javax.lang.model.element.Element -import javax.lang.model.element.TypeElement -import javax.tools.Diagnostic.Kind.* - -@Target(AnnotationTarget.CLASS) -annotation class TestAnnotation - -@SupportedSourceVersion(SourceVersion.RELEASE_8) -@SupportedAnnotationTypes("org.kotlin.annotationProcessor.TestAnnotation") -@SupportedOptions(TestAnnotationProcessor.KAPT_KOTLIN_GENERATED_OPTION_NAME) -class TestAnnotationProcessor : AbstractProcessor() { - companion object { - const val KAPT_KOTLIN_GENERATED_OPTION_NAME = "kapt.kotlin.generated" - } - - override fun process(annotations: MutableSet?, roundEnv: RoundEnvironment): Boolean { - val annotatedElements = roundEnv.getElementsAnnotatedWith(TestAnnotation::class.java) - if (annotatedElements.isEmpty()) return false - - val kaptKotlinGeneratedDir = processingEnv.options[KAPT_KOTLIN_GENERATED_OPTION_NAME] ?: run { - processingEnv.messager.printMessage(ERROR, "Can't find the target directory for generated Kotlin files.") - return false - } - - val generatedKtFile = kotlinFile("test.generated") { - for (element in annotatedElements) { - val typeElement = element.toTypeElementOrNull() ?: continue - - property("simpleClassName") { - receiverType(typeElement.qualifiedName.toString()) - getterExpression("this::class.java.simpleName") - } - } - } - - File(kaptKotlinGeneratedDir, "testGenerated.kt").apply { - parentFile.mkdirs() - writeText(generatedKtFile.accept(PrettyPrinter(PrettyPrinterConfiguration()))) - } - - return true - } - - fun Element.toTypeElementOrNull(): TypeElement? { - if (this !is TypeElement) { - processingEnv.messager.printMessage(ERROR, "Invalid element type, class expected", this) - return null - } - - return this - } -} \ No newline at end of file diff --git a/gradle/kotlin-code-generation/annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor b/gradle/kotlin-code-generation/annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor deleted file mode 100644 index f18297ebb0..0000000000 --- a/gradle/kotlin-code-generation/annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor +++ /dev/null @@ -1 +0,0 @@ -org.kotlin.annotationProcessor.TestAnnotationProcessor \ No newline at end of file diff --git a/gradle/kotlin-code-generation/build.gradle b/gradle/kotlin-code-generation/build.gradle deleted file mode 100644 index 5977c5d5a8..0000000000 --- a/gradle/kotlin-code-generation/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.2-3' - - repositories { - jcenter() - mavenLocal() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - jcenter() - maven { url 'https://jitpack.io' } - } -} diff --git a/gradle/kotlin-code-generation/example/build.gradle b/gradle/kotlin-code-generation/example/build.gradle deleted file mode 100644 index 11d55570bf..0000000000 --- a/gradle/kotlin-code-generation/example/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -apply plugin: 'kotlin' -apply plugin: 'kotlin-kapt' - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - - compile project(":annotation-processor") - kapt project(":annotation-processor") - - testCompile 'junit:junit:4.12' -} - -apply plugin: 'idea' - -idea { - module { - sourceDirs += files('build/generated/source/kapt/main', 'build/generated/source/kaptKotlin/main') - generatedSourceDirs += files('build/generated/source/kapt/main', 'build/generated/source/kaptKotlin/main') - } -} \ No newline at end of file diff --git a/gradle/kotlin-code-generation/example/src/main/java/Example.kt b/gradle/kotlin-code-generation/example/src/main/java/Example.kt deleted file mode 100644 index 4d742662b0..0000000000 --- a/gradle/kotlin-code-generation/example/src/main/java/Example.kt +++ /dev/null @@ -1,6 +0,0 @@ -package org.kotlin.test - -import org.kotlin.annotationProcessor.TestAnnotation - -@TestAnnotation -class SimpleClass \ No newline at end of file diff --git a/gradle/kotlin-code-generation/example/src/test/java/test.kt b/gradle/kotlin-code-generation/example/src/test/java/test.kt deleted file mode 100644 index 33854ef9a4..0000000000 --- a/gradle/kotlin-code-generation/example/src/test/java/test.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.kotlin.test - -import org.junit.Test -import org.junit.Assert.* -import test.generated.simpleClassName - -class AnnotationTest { - @Test fun testSimple() { - assertEquals("SimpleClass", SimpleClass().simpleClassName) - } -} \ No newline at end of file diff --git a/gradle/kotlin-code-generation/gradle.properties b/gradle/kotlin-code-generation/gradle.properties deleted file mode 100644 index dc3793168f..0000000000 --- a/gradle/kotlin-code-generation/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -kapt.verbose=true \ No newline at end of file diff --git a/gradle/kotlin-code-generation/gradle/wrapper/gradle-wrapper.jar b/gradle/kotlin-code-generation/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 54fd550a79..0000000000 Binary files a/gradle/kotlin-code-generation/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/kotlin-code-generation/gradle/wrapper/gradle-wrapper.properties b/gradle/kotlin-code-generation/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 3dcf338a4e..0000000000 --- a/gradle/kotlin-code-generation/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri May 19 20:49:52 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/gradle/kotlin-code-generation/gradlew b/gradle/kotlin-code-generation/gradlew deleted file mode 100755 index 4453ccea33..0000000000 --- a/gradle/kotlin-code-generation/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save ( ) { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/gradle/kotlin-code-generation/gradlew.bat b/gradle/kotlin-code-generation/gradlew.bat deleted file mode 100644 index f9553162f1..0000000000 --- a/gradle/kotlin-code-generation/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/kotlin-code-generation/settings.gradle b/gradle/kotlin-code-generation/settings.gradle deleted file mode 100644 index 046135aeaf..0000000000 --- a/gradle/kotlin-code-generation/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':annotation-processor', ':example' \ No newline at end of file diff --git a/gradle/kotlin-code-generation/src/main/java/Library.java b/gradle/kotlin-code-generation/src/main/java/Library.java deleted file mode 100644 index fa1b41a263..0000000000 --- a/gradle/kotlin-code-generation/src/main/java/Library.java +++ /dev/null @@ -1,8 +0,0 @@ -/* - * This Java source file was generated by the Gradle 'init' task. - */ -public class Library { - public boolean someLibraryMethod() { - return true; - } -} diff --git a/gradle/kotlin-code-generation/src/test/java/LibraryTest.java b/gradle/kotlin-code-generation/src/test/java/LibraryTest.java deleted file mode 100644 index 645740d030..0000000000 --- a/gradle/kotlin-code-generation/src/test/java/LibraryTest.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * This Java source file was generated by the Gradle 'init' task. - */ -import org.junit.Test; -import static org.junit.Assert.*; - -public class LibraryTest { - @Test public void testSomeLibraryMethod() { - Library classUnderTest = new Library(); - assertTrue("someLibraryMethod should return 'true'", classUnderTest.someLibraryMethod()); - } -} diff --git a/gradle/kotlin-dagger/.gitignore b/gradle/kotlin-dagger/.gitignore deleted file mode 100644 index 916b2457a5..0000000000 --- a/gradle/kotlin-dagger/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea -.DS_Store -/build -/captures \ No newline at end of file diff --git a/gradle/kotlin-dagger/build.gradle b/gradle/kotlin-dagger/build.gradle deleted file mode 100644 index 5fc180cc24..0000000000 --- a/gradle/kotlin-dagger/build.gradle +++ /dev/null @@ -1,39 +0,0 @@ -group 'kotlin-dagger' -version '1.0-SNAPSHOT' - -buildscript { - ext.kotlin_version = '1.1.2' - ext.dagger_version = '2.10' - - repositories { - jcenter() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'kotlin-kapt' -apply plugin: 'idea' - -repositories { - jcenter() -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" - - compile "com.google.dagger:dagger:$dagger_version" - kapt "com.google.dagger:dagger-compiler:$dagger_version" -} - -// At the moment for non-Android projects you need to explicitly -// mark the code generated by kapt as 'generated source code' -// for correct highlighting and resolve in IDE. -idea { - module { - sourceDirs += file('build/generated/source/kapt/main') - generatedSourceDirs += file('build/generated/source/kapt/main') - } -} \ No newline at end of file diff --git a/gradle/kotlin-dagger/gradle/wrapper/gradle-wrapper.jar b/gradle/kotlin-dagger/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 000abe421f..0000000000 Binary files a/gradle/kotlin-dagger/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/kotlin-dagger/gradle/wrapper/gradle-wrapper.properties b/gradle/kotlin-dagger/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 9fd73dd20e..0000000000 --- a/gradle/kotlin-dagger/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri May 12 15:27:54 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/gradle/kotlin-dagger/gradlew b/gradle/kotlin-dagger/gradlew deleted file mode 100755 index 4453ccea33..0000000000 --- a/gradle/kotlin-dagger/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save ( ) { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/gradle/kotlin-dagger/gradlew.bat b/gradle/kotlin-dagger/gradlew.bat deleted file mode 100644 index f9553162f1..0000000000 --- a/gradle/kotlin-dagger/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/kotlin-dagger/settings.gradle b/gradle/kotlin-dagger/settings.gradle deleted file mode 100644 index ee69b1a18b..0000000000 --- a/gradle/kotlin-dagger/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'kotlin-dagger' - diff --git a/gradle/kotlin-dagger/src/main/kotlin/Coffee.kt b/gradle/kotlin-dagger/src/main/kotlin/Coffee.kt deleted file mode 100644 index 3a6ca41bb7..0000000000 --- a/gradle/kotlin-dagger/src/main/kotlin/Coffee.kt +++ /dev/null @@ -1,77 +0,0 @@ -package com.example.dagger.kotlin - -import dagger.* -import javax.inject.Inject -import javax.inject.Singleton - -interface Heater { - fun on() - fun off() - val isHot: Boolean -} - -interface Pump { - fun pump() -} - -class ElectricHeater : Heater { - var heating: Boolean = false - - override fun on() { - println("~ ~ ~ heating ~ ~ ~") - this.heating = true - } - - override fun off() { - this.heating = false - } - - override val isHot get() = heating -} - -class Thermosiphon -@Inject constructor( - private val heater: Heater -) : Pump { - override fun pump() { - if (heater.isHot) { - println("=> => pumping => =>") - } - } -} - -@Module -abstract class PumpModule { - @Binds - abstract fun providePump(pump: Thermosiphon): Pump -} - -@Module(includes = arrayOf(PumpModule::class)) -class DripCoffeeModule { - @Provides @Singleton - fun provideHeater(): Heater = ElectricHeater() -} - -class CoffeeMaker -@Inject constructor( - private val heater: Lazy, - private val pump: Pump -) { - fun brew() { - heater.get().on() - pump.pump() - println(" [_]P coffee! [_]P ") - heater.get().off() - } -} - -@Singleton -@Component(modules = arrayOf(DripCoffeeModule::class)) -interface CoffeeShop { - fun maker(): CoffeeMaker -} - -fun main(args: Array) { - val coffee = DaggerCoffeeShop.builder().build() - coffee.maker().brew() -} diff --git a/gradle/kotlin-querydsl/.gitignore b/gradle/kotlin-querydsl/.gitignore deleted file mode 100755 index 9ca496ca56..0000000000 --- a/gradle/kotlin-querydsl/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store - -generated -generated_tests - -.idea/ -*.iml -*.iws -*.ipr - -build/ - -.gradle/ diff --git a/gradle/kotlin-querydsl/LICENSE.txt b/gradle/kotlin-querydsl/LICENSE.txt deleted file mode 100644 index b4658b6150..0000000000 --- a/gradle/kotlin-querydsl/LICENSE.txt +++ /dev/null @@ -1,2 +0,0 @@ -This project is imported and J2K-ed from this repository: -https://github.com/bsideup/querydsl-gradle-idea \ No newline at end of file diff --git a/gradle/kotlin-querydsl/build.gradle b/gradle/kotlin-querydsl/build.gradle deleted file mode 100755 index 10b59750c1..0000000000 --- a/gradle/kotlin-querydsl/build.gradle +++ /dev/null @@ -1,39 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.2-5' - - repositories { - mavenCentral() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'java' -apply plugin: 'kotlin' -apply plugin: 'kotlin-kapt' -apply plugin: 'idea' - -dependencies { - compile "com.mysema.querydsl:querydsl-jpa:3.6.3" - kapt "com.mysema.querydsl:querydsl-apt:3.6.3:jpa" // Magic happens here - - compile "org.hibernate:hibernate-entitymanager:4.3.5.Final" - - compile 'com.h2database:h2:1.4.187' - - compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" -} - -repositories { - jcenter() -} - -idea { - module { - def kaptMain = file('build/generated/source/kapt/main') - sourceDirs += kaptMain - generatedSourceDirs += kaptMain - } -} \ No newline at end of file diff --git a/gradle/kotlin-querydsl/gradle/wrapper/gradle-wrapper.jar b/gradle/kotlin-querydsl/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 085a1cdc27..0000000000 Binary files a/gradle/kotlin-querydsl/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/kotlin-querydsl/gradle/wrapper/gradle-wrapper.properties b/gradle/kotlin-querydsl/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index da0e5c9b16..0000000000 --- a/gradle/kotlin-querydsl/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Jun 20 14:44:56 MSK 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip diff --git a/gradle/kotlin-querydsl/gradlew b/gradle/kotlin-querydsl/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/gradle/kotlin-querydsl/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/kotlin-querydsl/gradlew.bat b/gradle/kotlin-querydsl/gradlew.bat deleted file mode 100755 index 8a0b282aa6..0000000000 --- a/gradle/kotlin-querydsl/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/kotlin-querydsl/src/main/java/ru/trylogic/querydsl/example/Test.kt b/gradle/kotlin-querydsl/src/main/java/ru/trylogic/querydsl/example/Test.kt deleted file mode 100755 index ad76dd52bf..0000000000 --- a/gradle/kotlin-querydsl/src/main/java/ru/trylogic/querydsl/example/Test.kt +++ /dev/null @@ -1,51 +0,0 @@ -package ru.trylogic.querydsl.example - -import com.mysema.query.jpa.impl.JPAQuery -import org.hibernate.Hibernate -import org.hibernate.SessionFactory -import org.hibernate.cfg.Configuration -import org.hibernate.cfg.Environment - -import javax.persistence.EntityManager -import javax.persistence.EntityManagerFactory -import javax.persistence.EntityTransaction -import javax.persistence.Persistence -import java.util.HashMap - -import ru.trylogic.querydsl.example.QUser.user - -object Test { - @JvmStatic - fun main(args: Array) = Persistence.createEntityManagerFactory("unit").use { emf -> - emf.createEntityManager().use { entityManager -> - val transaction = entityManager.transaction - transaction.begin() - - with (entityManager) { - persist(User("Smith")) - persist(User("Gates")) - persist(User("Orlov")) - persist(User("Smirnov")) - persist(User("Orlov")) - - flush() - } - - transaction.commit() - - val query = JPAQuery(entityManager) - - val uniqueUserNames = query.from(user) - .where(user.name.like("%ov")) - .groupBy(user.name) - .list(user.name) - - println("Unique names: ") - uniqueUserNames.forEach { println(it) } - } - } -} - -inline fun EntityManagerFactory.use(f: (EntityManagerFactory) -> T) = try { f(this) } finally { close() } - -inline fun EntityManager.use(f: (EntityManager) -> T) = try { f(this) } finally { close() } \ No newline at end of file diff --git a/gradle/kotlin-querydsl/src/main/java/ru/trylogic/querydsl/example/User.kt b/gradle/kotlin-querydsl/src/main/java/ru/trylogic/querydsl/example/User.kt deleted file mode 100755 index d5e0d7c30c..0000000000 --- a/gradle/kotlin-querydsl/src/main/java/ru/trylogic/querydsl/example/User.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ru.trylogic.querydsl.example - -import javax.persistence.Entity -import javax.persistence.GeneratedValue -import javax.persistence.GenerationType -import javax.persistence.Id - -@Entity -class User( - val name: String, - @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val id: Int = 0) \ No newline at end of file diff --git a/gradle/kotlin-querydsl/src/main/resources/META-INF/persistence.xml b/gradle/kotlin-querydsl/src/main/resources/META-INF/persistence.xml deleted file mode 100755 index 7f37a360ca..0000000000 --- a/gradle/kotlin-querydsl/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - org.hibernate.jpa.HibernatePersistenceProvider - ru.trylogic.querydsl.example.User - - - - - - - - - - diff --git a/gradle/mixed-java-kotlin-hello-world/.gitignore b/gradle/mixed-java-kotlin-hello-world/.gitignore deleted file mode 100644 index 91ea7410d8..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -.gradle diff --git a/gradle/mixed-java-kotlin-hello-world/build.gradle b/gradle/mixed-java-kotlin-hello-world/build.gradle deleted file mode 100644 index 8ea191b17d..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.4-3' - repositories { - mavenCentral() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: "kotlin" -apply plugin: "application" - -mainClassName = "demo.HelloWorld" - -sourceSets { - deploy -} - -repositories { - mavenCentral() -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - testCompile 'junit:junit:4.11' - testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" -} - -test.testClassesDir = project.tasks.compileTestKotlin.destinationDir - -task wrapper(type: Wrapper) { - gradleVersion="4.1" -} diff --git a/gradle/mixed-java-kotlin-hello-world/gradle/wrapper/gradle-wrapper.jar b/gradle/mixed-java-kotlin-hello-world/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index e8c6bf7bb4..0000000000 Binary files a/gradle/mixed-java-kotlin-hello-world/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/mixed-java-kotlin-hello-world/gradle/wrapper/gradle-wrapper.properties b/gradle/mixed-java-kotlin-hello-world/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 7336e4df6c..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Thu Feb 04 17:38:08 CET 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/gradle/mixed-java-kotlin-hello-world/gradlew b/gradle/mixed-java-kotlin-hello-world/gradlew deleted file mode 100755 index 97fac783e1..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradle/mixed-java-kotlin-hello-world/gradlew.bat b/gradle/mixed-java-kotlin-hello-world/gradlew.bat deleted file mode 100644 index 8a0b282aa6..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle/mixed-java-kotlin-hello-world/src/deploy/kotlin/kotlinSrc.kt b/gradle/mixed-java-kotlin-hello-world/src/deploy/kotlin/kotlinSrc.kt deleted file mode 100644 index f3cee77915..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/src/deploy/kotlin/kotlinSrc.kt +++ /dev/null @@ -1,9 +0,0 @@ -package demo - -class ExampleSource(param: Int) { - val property = param - - fun f(): String { - return "Hello World" - } -} diff --git a/gradle/mixed-java-kotlin-hello-world/src/main/java/demo/Greeter.java b/gradle/mixed-java-kotlin-hello-world/src/main/java/demo/Greeter.java deleted file mode 100644 index 4f8159d1c2..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/src/main/java/demo/Greeter.java +++ /dev/null @@ -1,13 +0,0 @@ -package demo; - -public class Greeter { - private final String myGreeting; - - public Greeter(String greeting) { - myGreeting = greeting; - } - - public String getGreeting() { - return myGreeting; - } -} diff --git a/gradle/mixed-java-kotlin-hello-world/src/main/java/demo/HelloWorld.java b/gradle/mixed-java-kotlin-hello-world/src/main/java/demo/HelloWorld.java deleted file mode 100644 index 465a06d5ff..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/src/main/java/demo/HelloWorld.java +++ /dev/null @@ -1,14 +0,0 @@ -package demo; - -public class HelloWorld { - public static void main(String[] args) { - final KotlinGreetingJoiner example = new KotlinGreetingJoiner(new Greeter("Hi")); - - example.addName("Harry"); - example.addName("Ron"); - example.addName(null); - example.addName("Hermione"); - - System.out.println(example.getJoinedGreeting()); - } -} diff --git a/gradle/mixed-java-kotlin-hello-world/src/main/kotlin/helloWorld.kt b/gradle/mixed-java-kotlin-hello-world/src/main/kotlin/helloWorld.kt deleted file mode 100644 index 91d6a8fa87..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/src/main/kotlin/helloWorld.kt +++ /dev/null @@ -1,16 +0,0 @@ -package demo - -import java.util.* - -class KotlinGreetingJoiner(val greeter: Greeter) { - - val names = ArrayList() - - fun addName(name: String?) { - names.add(name) - } - - fun getJoinedGreeting(): String { - return "${greeter.getGreeting()} ${names.filterNotNull().joinToString(separator = " and ")}" - } -} diff --git a/gradle/mixed-java-kotlin-hello-world/src/test/kotlin/tests.kt b/gradle/mixed-java-kotlin-hello-world/src/test/kotlin/tests.kt deleted file mode 100644 index 2d3f6fa6e2..0000000000 --- a/gradle/mixed-java-kotlin-hello-world/src/test/kotlin/tests.kt +++ /dev/null @@ -1,17 +0,0 @@ -package demo - -import kotlin.test.assertEquals -import org.junit.Test as test - -class TestSource() { - @test fun f() { - val example : KotlinGreetingJoiner = KotlinGreetingJoiner(Greeter("Hi")) - example.addName("Harry") - example.addName("Ron") - example.addName(null) - example.addName("Hermione") - - assertEquals(example.getJoinedGreeting(), "Hi Harry and Ron and Hermione") - } -} - diff --git a/idea/js-tests/.gitignore b/idea/js-tests/.gitignore deleted file mode 100644 index 9209ef5bfd..0000000000 --- a/idea/js-tests/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -out diff --git a/idea/js-tests/.idea/kotlinc.xml b/idea/js-tests/.idea/kotlinc.xml deleted file mode 100644 index 0b607221a0..0000000000 --- a/idea/js-tests/.idea/kotlinc.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/idea/js-tests/.idea/libraries/KotlinJavaScript.xml b/idea/js-tests/.idea/libraries/KotlinJavaScript.xml deleted file mode 100644 index 4d678549a0..0000000000 --- a/idea/js-tests/.idea/libraries/KotlinJavaScript.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/idea/js-tests/.idea/libraries/kotlin_test_js.xml b/idea/js-tests/.idea/libraries/kotlin_test_js.xml deleted file mode 100644 index 6d3aadfe68..0000000000 --- a/idea/js-tests/.idea/libraries/kotlin_test_js.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/idea/js-tests/.idea/misc.xml b/idea/js-tests/.idea/misc.xml deleted file mode 100644 index 05483570e0..0000000000 --- a/idea/js-tests/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/idea/js-tests/.idea/modules.xml b/idea/js-tests/.idea/modules.xml deleted file mode 100644 index 30e467016a..0000000000 --- a/idea/js-tests/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/idea/js-tests/.idea/runConfigurations/Run_tests.xml b/idea/js-tests/.idea/runConfigurations/Run_tests.xml deleted file mode 100644 index 809621110a..0000000000 --- a/idea/js-tests/.idea/runConfigurations/Run_tests.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - project - - $PROJECT_DIR$ - true - - - - bdd - - TEST_FILE - $PROJECT_DIR$/out/test/js-tests/js-tests_test.js - - - \ No newline at end of file diff --git a/idea/js-tests/README.md b/idea/js-tests/README.md deleted file mode 100644 index 401b0b1f03..0000000000 --- a/idea/js-tests/README.md +++ /dev/null @@ -1,4 +0,0 @@ -A sample test condiguration for IDEA Ultimate. Requires the [NodeJs](https://plugins.jetbrains.com/plugin/6098-nodejs) plugin. - -In order to run the tests, build the project, run `npm install` in the project directory, -and launch the 'Run tests' run configuration. diff --git a/idea/js-tests/js-tests.iml b/idea/js-tests/js-tests.iml deleted file mode 100644 index 70ba89fb63..0000000000 --- a/idea/js-tests/js-tests.iml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/idea/js-tests/package.json b/idea/js-tests/package.json deleted file mode 100644 index 5cd4ff426d..0000000000 --- a/idea/js-tests/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "devDependencies": { - "mocha": "^3.4.2" - } -} diff --git a/idea/js-tests/src/Main.kt b/idea/js-tests/src/Main.kt deleted file mode 100644 index 1b2fec59b6..0000000000 --- a/idea/js-tests/src/Main.kt +++ /dev/null @@ -1 +0,0 @@ -fun foo() = 10 \ No newline at end of file diff --git a/idea/js-tests/test/MainTest.kt b/idea/js-tests/test/MainTest.kt deleted file mode 100644 index 051b27f4de..0000000000 --- a/idea/js-tests/test/MainTest.kt +++ /dev/null @@ -1,19 +0,0 @@ -import kotlin.test.* - -class SimpleTest { - - @Test fun testFoo() { - assertEquals(10, foo()) - } - - @Ignore @Test fun testFooWrong() { - assertEquals(20, foo()) - } -} - -@Ignore -class TestTest { - @Test fun emptyTest() { - // Will not run - } -} diff --git a/maven/dagger-maven-example/.gitignore b/maven/dagger-maven-example/.gitignore deleted file mode 100644 index 2a332e7de9..0000000000 --- a/maven/dagger-maven-example/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -target -.idea - -.settings/ -.classpath -.project diff --git a/maven/dagger-maven-example/pom.xml b/maven/dagger-maven-example/pom.xml deleted file mode 100644 index a82a7302c4..0000000000 --- a/maven/dagger-maven-example/pom.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - 4.0.0 - - org.jetbrains.kotlin.examples - dagger-maven-example - 1.0-SNAPSHOT - - - 1.1-SNAPSHOT - 4.12 - coffee.CoffeeApp - UTF-8 - - - - - com.google.dagger - dagger - 2.9 - - - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin.version} - - - junit - junit - ${junit.version} - test - - - - - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - kapt - - kapt - - - - src/main/kotlin - src/main/java - - - - com.google.dagger - dagger-compiler - 2.9 - - - - - - compile - - compile - - - - src/main/kotlin - src/main/java - - - - - test-kapt - - test-kapt - - - - src/test/kotlin - src/test/java - - - - com.google.dagger - dagger-compiler - 2.9 - - - - - - test-compile - - test-compile - - - - src/test/kotlin - src/test/java - target/generated-sources/kapt/test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - none - 1.6 - 1.6 - - - - - default-compile - none - - - - default-testCompile - none - - - java-compile - compile - - compile - - - - java-test-compile - test-compile - testCompile - - - - - - diff --git a/maven/dagger-maven-example/src/main/kotlin/CoffeeApp.kt b/maven/dagger-maven-example/src/main/kotlin/CoffeeApp.kt deleted file mode 100755 index 9e1d910ef4..0000000000 --- a/maven/dagger-maven-example/src/main/kotlin/CoffeeApp.kt +++ /dev/null @@ -1,18 +0,0 @@ -package coffee - -import dagger.Component -import javax.inject.Singleton - -object CoffeeApp { - @Singleton - @Component(modules = arrayOf(DripCoffeeModule::class)) - interface Coffee { - fun maker(): CoffeeMaker - } - - @JvmStatic - fun main(args: Array) { - val coffee = DaggerCoffeeApp_Coffee.builder().build() - coffee.maker().brew() - } -} diff --git a/maven/dagger-maven-example/src/main/kotlin/CoffeeMaker.kt b/maven/dagger-maven-example/src/main/kotlin/CoffeeMaker.kt deleted file mode 100755 index 58e9de6e83..0000000000 --- a/maven/dagger-maven-example/src/main/kotlin/CoffeeMaker.kt +++ /dev/null @@ -1,17 +0,0 @@ -package coffee - -import dagger.Lazy -import javax.inject.Inject - -class CoffeeMaker @Inject constructor( - private val heater: Lazy, - private val pump: Pump -) { - - fun brew() { - heater.get().on() - pump.pump() - println(" [_]P coffee! [_]P ") - heater.get().off() - } -} diff --git a/maven/dagger-maven-example/src/main/kotlin/DripCoffeeModule.kt b/maven/dagger-maven-example/src/main/kotlin/DripCoffeeModule.kt deleted file mode 100755 index a8c1dae207..0000000000 --- a/maven/dagger-maven-example/src/main/kotlin/DripCoffeeModule.kt +++ /dev/null @@ -1,13 +0,0 @@ -package coffee - -import dagger.Module -import dagger.Provides -import javax.inject.Singleton - -@Module(includes = arrayOf(PumpModule::class)) -class DripCoffeeModule { - @Provides @Singleton - fun provideHeater(): Heater { - return ElectricHeater() - } -} diff --git a/maven/dagger-maven-example/src/main/kotlin/ElectricHeater.kt b/maven/dagger-maven-example/src/main/kotlin/ElectricHeater.kt deleted file mode 100755 index 6c1f1586a4..0000000000 --- a/maven/dagger-maven-example/src/main/kotlin/ElectricHeater.kt +++ /dev/null @@ -1,14 +0,0 @@ -package coffee - -open class ElectricHeater : Heater { - override var isHot: Boolean = false - - override fun on() { - println("~ ~ ~ heating ~ ~ ~") - this.isHot = true - } - - override fun off() { - this.isHot = false - } -} diff --git a/maven/dagger-maven-example/src/main/kotlin/Heater.kt b/maven/dagger-maven-example/src/main/kotlin/Heater.kt deleted file mode 100755 index f2ec5dabcc..0000000000 --- a/maven/dagger-maven-example/src/main/kotlin/Heater.kt +++ /dev/null @@ -1,7 +0,0 @@ -package coffee - -interface Heater { - fun on() - fun off() - val isHot: Boolean -} diff --git a/maven/dagger-maven-example/src/main/kotlin/Pump.kt b/maven/dagger-maven-example/src/main/kotlin/Pump.kt deleted file mode 100755 index 5c45453898..0000000000 --- a/maven/dagger-maven-example/src/main/kotlin/Pump.kt +++ /dev/null @@ -1,5 +0,0 @@ -package coffee - -interface Pump { - fun pump() -} diff --git a/maven/dagger-maven-example/src/main/kotlin/PumpModule.kt b/maven/dagger-maven-example/src/main/kotlin/PumpModule.kt deleted file mode 100755 index a892e2b770..0000000000 --- a/maven/dagger-maven-example/src/main/kotlin/PumpModule.kt +++ /dev/null @@ -1,10 +0,0 @@ -package coffee - -import dagger.Binds -import dagger.Module - -@Module -abstract class PumpModule { - @Binds - abstract fun providePump(pump: Thermosiphon): Pump -} diff --git a/maven/dagger-maven-example/src/main/kotlin/Thermosiphon.kt b/maven/dagger-maven-example/src/main/kotlin/Thermosiphon.kt deleted file mode 100755 index 09c84cff05..0000000000 --- a/maven/dagger-maven-example/src/main/kotlin/Thermosiphon.kt +++ /dev/null @@ -1,12 +0,0 @@ -package coffee - -import javax.inject.Inject - -class Thermosiphon @Inject -constructor(private val heater: Heater) : Pump { - override fun pump() { - if (heater.isHot) { - println("=> => pumping => =>") - } - } -} diff --git a/maven/dagger-maven-example/src/test/kotlin/hello/tests/ExampleTest.kt b/maven/dagger-maven-example/src/test/kotlin/hello/tests/ExampleTest.kt deleted file mode 100644 index 9b3f523e86..0000000000 --- a/maven/dagger-maven-example/src/test/kotlin/hello/tests/ExampleTest.kt +++ /dev/null @@ -1,39 +0,0 @@ -package hello.tests - -import coffee.* -import dagger.Component -import dagger.Module -import dagger.Provides -import junit.framework.TestCase -import javax.inject.Singleton - -private var executed = false - -class ExampleTest : TestCase() { - @Singleton - @Component(modules = arrayOf(TestCoffeeModule::class)) - interface Coffee { - fun maker(): CoffeeMaker - } - - @Module(includes = arrayOf(PumpModule::class)) - class TestCoffeeModule { - @Provides @Singleton - fun provideHeater(): Heater { - return object: ElectricHeater() { - override fun on() { - println("~ psh ~ psh ~ psh ~") - println("(from tests)") - executed = true - super.on() - } - } - } - } - - fun testAssert() { - val coffee = DaggerExampleTest_Coffee.builder().build() - coffee.maker().brew() - assert(executed) - } -} diff --git a/maven/dokka-maven-example/Module.md b/maven/dokka-maven-example/Module.md deleted file mode 100644 index f490749a8d..0000000000 --- a/maven/dokka-maven-example/Module.md +++ /dev/null @@ -1,7 +0,0 @@ -# Module dokka-maven-example - -This is an example of how you can write module documentation with Dokka. - -# Package demo - -This package contains a few examples of Dokka usage. diff --git a/maven/dokka-maven-example/pom.xml b/maven/dokka-maven-example/pom.xml deleted file mode 100644 index 98f3ed134b..0000000000 --- a/maven/dokka-maven-example/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - 4.0.0 - - org.jetbrains.kotlin.examples - kotlin-maven-example - 1.0-SNAPSHOT - - 1.0.3 - 0.9.9 - - - - - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin.version} - - - - - ${project.basedir}/src/main/kotlin - - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - - compile - compile - - compile - - - - - test-compile - test-compile - test-compile - - - - - - org.jetbrains.dokka - dokka-maven-plugin - ${dokka.version} - - - pre-site - - dokka - javadoc - - - - - - Module.md - - - - ${project.basedir} - https://github.com/JetBrains/kotlin-examples/blob/master/maven/dokka-maven-example - #L - - - - - - - - - - jcenter - JCenter - https://jcenter.bintray.com/ - - true - - - - diff --git a/maven/dokka-maven-example/src/main/kotlin/HelloWorld.kt b/maven/dokka-maven-example/src/main/kotlin/HelloWorld.kt deleted file mode 100644 index 172e18f7cf..0000000000 --- a/maven/dokka-maven-example/src/main/kotlin/HelloWorld.kt +++ /dev/null @@ -1,20 +0,0 @@ -package demo - -/** - * This class supports greeting people by name. - * - * @property name The name of the person to be greeted. - */ -class Greeter(val name: String) { - - /** - * Prints the greeting to the standard output. - */ - fun greet() { - println("Hello $name!") - } -} - -fun main(args: Array) { - Greeter(args[0]).greet() -} diff --git a/maven/hello-world/.gitignore b/maven/hello-world/.gitignore deleted file mode 100644 index c5078494ed..0000000000 --- a/maven/hello-world/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -target -.idea diff --git a/maven/hello-world/ReadMe.md b/maven/hello-world/ReadMe.md deleted file mode 100644 index 0dc3e5ffd4..0000000000 --- a/maven/hello-world/ReadMe.md +++ /dev/null @@ -1,30 +0,0 @@ -# Kotlin hello-world example with maven - -## Prerequisites to running the example - - * download Maven directly from the [Apache Maven homepage](http://maven.apache.org/download.html) - * install and configure your system as described in [the installation section](http://maven.apache.org/download.html#Installation) - -## Compiling/Testing/Running the example - -If you have maven on your path, simple type: - - mvn test - -It will compile: - * src/main/kotlin/Hello.kt into target/classes/hello/HelloKt.class - * src/test/kotlin/HelloTest.kt into target/test-classes/hello/tests/HelloTest.class - -Then run tests, and finally run your main HelloKt class. - -## Only running the example - -Once you compiled the sources with previous 'mvn test' command, you can run the application by typing: - - mvn exec:java - -## Using commandline arguments - -If you want to modify the main method in Hello.kt in order to use commandline arguments, you can specify them on commandline as: - - mvn exec:java -Dexec.args="argument1" diff --git a/maven/hello-world/pom.xml b/maven/hello-world/pom.xml deleted file mode 100644 index 4f575aed0c..0000000000 --- a/maven/hello-world/pom.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - 4.0.0 - - org.jetbrains.kotlin.examples - hello-world - 1.0-SNAPSHOT - - - 1.0.3 - 4.12 - hello.HelloKt - UTF-8 - - - - - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin.version} - - - - junit - junit - ${junit.version} - test - - - org.jetbrains.kotlin - kotlin-test-junit - ${kotlin.version} - test - - - - - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin - - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - - - compile - compile - - compile - - - - test-compile - test-compile - - test-compile - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - true - ${main.class} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - test - - java - - - - - ${main.class} - - - - - diff --git a/maven/hello-world/src/main/kotlin/Hello.kt b/maven/hello-world/src/main/kotlin/Hello.kt deleted file mode 100644 index a31d8caf76..0000000000 --- a/maven/hello-world/src/main/kotlin/Hello.kt +++ /dev/null @@ -1,10 +0,0 @@ -package hello - -fun getHelloString() : String { - return "Hello, world!" -} - -fun main(args : Array) { - println(getHelloString()) -} - diff --git a/maven/hello-world/src/test/kotlin/HelloTest.kt b/maven/hello-world/src/test/kotlin/HelloTest.kt deleted file mode 100644 index ac4d52a9c6..0000000000 --- a/maven/hello-world/src/test/kotlin/HelloTest.kt +++ /dev/null @@ -1,11 +0,0 @@ -package hello.tests - -import hello.getHelloString -import kotlin.test.assertEquals -import org.junit.Test - -class HelloTest { - @Test fun testAssert() : Unit { - assertEquals("Hello, world!", getHelloString()) - } -} diff --git a/maven/kotlin-querydsl/.gitignore b/maven/kotlin-querydsl/.gitignore deleted file mode 100755 index 4286515b69..0000000000 --- a/maven/kotlin-querydsl/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.DS_Store - -generated -generated_tests - -.idea/ -*.iml -*.iws -*.ipr - -target/ \ No newline at end of file diff --git a/maven/kotlin-querydsl/LICENSE.txt b/maven/kotlin-querydsl/LICENSE.txt deleted file mode 100644 index b4658b6150..0000000000 --- a/maven/kotlin-querydsl/LICENSE.txt +++ /dev/null @@ -1,2 +0,0 @@ -This project is imported and J2K-ed from this repository: -https://github.com/bsideup/querydsl-gradle-idea \ No newline at end of file diff --git a/maven/kotlin-querydsl/pom.xml b/maven/kotlin-querydsl/pom.xml deleted file mode 100644 index 0caf752507..0000000000 --- a/maven/kotlin-querydsl/pom.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - 4.0.0 - - org.jetbrains.kotlin.examples - querydsl-maven-example - 1.0-SNAPSHOT - - - 1.2-SNAPSHOT - 4.12 - ru.trylogic.querydsl.example.Test - UTF-8 - - - - - com.mysema.querydsl - querydsl-jpa - 3.6.3 - - - com.h2database - h2 - 1.4.187 - - - org.hibernate - hibernate-entitymanager - 4.3.5.Final - - - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin.version} - - - junit - junit - ${junit.version} - test - - - - - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - - kapt - - kapt - - - - src/main/kotlin - - - - - com.mysema.querydsl - querydsl-apt - 3.6.3 - jpa - - - - - - compile - - compile - - - - src/main/kotlin - src/main/java - - - - - test-kapt - - test-kapt - - - - src/test/kotlin - src/test/java - - - - com.google.dagger - dagger-compiler - 2.9 - - - - - - test-compile - - test-compile - - - - src/test/kotlin - src/test/java - target/generated-sources/kapt/test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - none - 1.6 - 1.6 - - - - - default-compile - none - - - - default-testCompile - none - - - java-compile - compile - - compile - - - - java-test-compile - test-compile - testCompile - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - true - ${main.class} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - test - - java - - - - - ${main.class} - - - - - diff --git a/maven/kotlin-querydsl/src/main/kotlin/ru/trylogic/querydsl/example/Test.kt b/maven/kotlin-querydsl/src/main/kotlin/ru/trylogic/querydsl/example/Test.kt deleted file mode 100755 index ad76dd52bf..0000000000 --- a/maven/kotlin-querydsl/src/main/kotlin/ru/trylogic/querydsl/example/Test.kt +++ /dev/null @@ -1,51 +0,0 @@ -package ru.trylogic.querydsl.example - -import com.mysema.query.jpa.impl.JPAQuery -import org.hibernate.Hibernate -import org.hibernate.SessionFactory -import org.hibernate.cfg.Configuration -import org.hibernate.cfg.Environment - -import javax.persistence.EntityManager -import javax.persistence.EntityManagerFactory -import javax.persistence.EntityTransaction -import javax.persistence.Persistence -import java.util.HashMap - -import ru.trylogic.querydsl.example.QUser.user - -object Test { - @JvmStatic - fun main(args: Array) = Persistence.createEntityManagerFactory("unit").use { emf -> - emf.createEntityManager().use { entityManager -> - val transaction = entityManager.transaction - transaction.begin() - - with (entityManager) { - persist(User("Smith")) - persist(User("Gates")) - persist(User("Orlov")) - persist(User("Smirnov")) - persist(User("Orlov")) - - flush() - } - - transaction.commit() - - val query = JPAQuery(entityManager) - - val uniqueUserNames = query.from(user) - .where(user.name.like("%ov")) - .groupBy(user.name) - .list(user.name) - - println("Unique names: ") - uniqueUserNames.forEach { println(it) } - } - } -} - -inline fun EntityManagerFactory.use(f: (EntityManagerFactory) -> T) = try { f(this) } finally { close() } - -inline fun EntityManager.use(f: (EntityManager) -> T) = try { f(this) } finally { close() } \ No newline at end of file diff --git a/maven/kotlin-querydsl/src/main/kotlin/ru/trylogic/querydsl/example/User.kt b/maven/kotlin-querydsl/src/main/kotlin/ru/trylogic/querydsl/example/User.kt deleted file mode 100755 index d5e0d7c30c..0000000000 --- a/maven/kotlin-querydsl/src/main/kotlin/ru/trylogic/querydsl/example/User.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ru.trylogic.querydsl.example - -import javax.persistence.Entity -import javax.persistence.GeneratedValue -import javax.persistence.GenerationType -import javax.persistence.Id - -@Entity -class User( - val name: String, - @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val id: Int = 0) \ No newline at end of file diff --git a/maven/kotlin-querydsl/src/main/resources/META-INF/persistence.xml b/maven/kotlin-querydsl/src/main/resources/META-INF/persistence.xml deleted file mode 100755 index 7f37a360ca..0000000000 --- a/maven/kotlin-querydsl/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - org.hibernate.jpa.HibernatePersistenceProvider - ru.trylogic.querydsl.example.User - - - - - - - - - - diff --git a/maven/mixed-code-hello-world/.gitignore b/maven/mixed-code-hello-world/.gitignore deleted file mode 100644 index 2a332e7de9..0000000000 --- a/maven/mixed-code-hello-world/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -target -.idea - -.settings/ -.classpath -.project diff --git a/maven/mixed-code-hello-world/pom.xml b/maven/mixed-code-hello-world/pom.xml deleted file mode 100644 index 7ce35b4376..0000000000 --- a/maven/mixed-code-hello-world/pom.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - 4.0.0 - - org.jetbrains.kotlin.examples - mixed-code-hello-world - 1.0-SNAPSHOT - - - 1.0.1-2 - 4.12 - kotlin.KotlinHelloKt - UTF-8 - - - - - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin.version} - - - - junit - junit - ${junit.version} - test - - - org.jetbrains.kotlin - kotlin-test-junit - ${kotlin.version} - test - - - - - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - compile - compile - - - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/main/java - - - - - test-compile - test-compile - - - ${project.basedir}/src/test/kotlin - ${project.basedir}/src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - - - default-compile - none - - - - default-testCompile - none - - - java-compile - compile - compile - - - java-test-compile - test-compile - testCompile - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - true - ${main.class} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.6 - - - make-assembly - package - single - - - - ${main.class} - - - - jar-with-dependencies - - - - - - - - diff --git a/maven/mixed-code-hello-world/src/main/java/hello/JavaHello.java b/maven/mixed-code-hello-world/src/main/java/hello/JavaHello.java deleted file mode 100644 index b41f759c02..0000000000 --- a/maven/mixed-code-hello-world/src/main/java/hello/JavaHello.java +++ /dev/null @@ -1,14 +0,0 @@ -package hello; - -public class JavaHello { - public static String JavaHelloString = "Hello from Java!"; - - public static String getHelloStringFromKotlin() { - return KotlinHelloKt.getKotlinHelloString(); - } - - public static void main(String[] args) { - System.out.println(getHelloStringFromKotlin()); - System.out.println(KotlinHelloKt.getHelloStringFromJava()); - } -} diff --git a/maven/mixed-code-hello-world/src/main/kotlin/hello/KotlinHello.kt b/maven/mixed-code-hello-world/src/main/kotlin/hello/KotlinHello.kt deleted file mode 100644 index e3b430b217..0000000000 --- a/maven/mixed-code-hello-world/src/main/kotlin/hello/KotlinHello.kt +++ /dev/null @@ -1,7 +0,0 @@ -package hello - -val KotlinHelloString : String = "Hello from Kotlin!" - -fun getHelloStringFromJava() : String { - return JavaHello.JavaHelloString!!; -} diff --git a/maven/mixed-code-hello-world/src/test/java/hello/tests/HelloTest.java b/maven/mixed-code-hello-world/src/test/java/hello/tests/HelloTest.java deleted file mode 100644 index b99e444fc0..0000000000 --- a/maven/mixed-code-hello-world/src/test/java/hello/tests/HelloTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package hello.tests; - -import hello.JavaHello; -import junit.framework.TestCase; - -public class HelloTest extends TestCase { - public void testAssert() { - assertEquals("Hello from Kotlin!", JavaHello.getHelloStringFromKotlin()); - assertEquals("Hello from Java!", hello.KotlinHelloKt.getHelloStringFromJava()); - - System.out.println(hello.KotlinHelloKt.getHelloStringFromJava()); - } -} diff --git a/maven/pom.xml b/maven/pom.xml deleted file mode 100644 index 26fc47e5b4..0000000000 --- a/maven/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - 4.0.0 - - org.jetbrains.kotlin - kotlin-examples - 0.1-SNAPSHOT - pom - - - hello-world - mixed-code-hello-world - - diff --git a/tutorials/servlet-web-applications/README.md b/tutorials/servlet-web-applications/README.md deleted file mode 100644 index b6f83ca984..0000000000 --- a/tutorials/servlet-web-applications/README.md +++ /dev/null @@ -1 +0,0 @@ -Code for the [Creating Web Applications with Http Servlets](http://kotlinlang.org/docs/tutorials/httpservlets.html) tutorial. diff --git a/tutorials/servlet-web-applications/build.gradle b/tutorials/servlet-web-applications/build.gradle deleted file mode 100644 index 6b944f1f13..0000000000 --- a/tutorials/servlet-web-applications/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.2' - repositories { - jcenter() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'kotlin' -apply plugin: 'war' - -repositories { - jcenter() -} - -dependencies { - compile group: 'javax', name: 'javaee-api', version: '7.0' - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" -} - -sourceSets { - main { - kotlin { - srcDir "src/main/kotlin" - } - } - test { - kotlin { - srcDir "test/main/kotlin" - } - } -} \ No newline at end of file diff --git a/tutorials/servlet-web-applications/gradle/wrapper/gradle-wrapper.jar b/tutorials/servlet-web-applications/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 05ef575b0c..0000000000 Binary files a/tutorials/servlet-web-applications/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/tutorials/servlet-web-applications/gradle/wrapper/gradle-wrapper.properties b/tutorials/servlet-web-applications/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 04b7fb269a..0000000000 --- a/tutorials/servlet-web-applications/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Sun Nov 01 01:58:36 SAST 2015 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip diff --git a/tutorials/servlet-web-applications/gradlew b/tutorials/servlet-web-applications/gradlew deleted file mode 100755 index 9d82f78915..0000000000 --- a/tutorials/servlet-web-applications/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/tutorials/servlet-web-applications/gradlew.bat b/tutorials/servlet-web-applications/gradlew.bat deleted file mode 100644 index 8a0b282aa6..0000000000 --- a/tutorials/servlet-web-applications/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/tutorials/servlet-web-applications/settings.gradle b/tutorials/servlet-web-applications/settings.gradle deleted file mode 100644 index c13d0e30e0..0000000000 --- a/tutorials/servlet-web-applications/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'servlet-web-applications' diff --git a/tutorials/servlet-web-applications/src/main/kotlin/HomeController.kt b/tutorials/servlet-web-applications/src/main/kotlin/HomeController.kt deleted file mode 100644 index 475e05a9b8..0000000000 --- a/tutorials/servlet-web-applications/src/main/kotlin/HomeController.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.jetbrains.kotlin.demo - -import javax.servlet.annotation.WebServlet -import javax.servlet.http.HttpServlet -import javax.servlet.http.HttpServletRequest -import javax.servlet.http.HttpServletResponse - -@WebServlet(name = "Hello", value = "/hello") -class HomeController : HttpServlet() { - override fun doGet(req: HttpServletRequest, res: HttpServletResponse) { - res.writer.write("Hello, World!") - } -} \ No newline at end of file diff --git a/tutorials/spring-boot-restful/.gitignore b/tutorials/spring-boot-restful/.gitignore deleted file mode 100644 index 09e68427fc..0000000000 --- a/tutorials/spring-boot-restful/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -.gradle -/build/ -!gradle/wrapper/gradle-wrapper.jar - -### Eclipse ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - diff --git a/tutorials/spring-boot-restful/README.md b/tutorials/spring-boot-restful/README.md deleted file mode 100644 index 2b2f4db994..0000000000 --- a/tutorials/spring-boot-restful/README.md +++ /dev/null @@ -1,11 +0,0 @@ -## Spring Boot Example - -This is a basic example of how to use Kotlin in a Spring Boot application. See the [accompanying tutorial](http://kotlinlang.org/docs/tutorials/spring-boot-restful.html) -for more information. - -To run: - -``` -$ ./gradlew bootRun -``` - diff --git a/tutorials/spring-boot-restful/build.gradle b/tutorials/spring-boot-restful/build.gradle deleted file mode 100644 index 20fc77d9aa..0000000000 --- a/tutorials/spring-boot-restful/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.1.3' // Required for Kotlin integration - ext.spring_boot_version = '1.5.4.RELEASE' - repositories { - jcenter() - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // Required for Kotlin integration - classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version" // See https://kotlinlang.org/docs/reference/compiler-plugins.html#kotlin-spring-compiler-plugin - classpath "org.springframework.boot:spring-boot-gradle-plugin:$spring_boot_version" - } -} - -apply plugin: 'kotlin' // Required for Kotlin integration -apply plugin: "kotlin-spring" // See https://kotlinlang.org/docs/reference/compiler-plugins.html#kotlin-spring-compiler-plugin -apply plugin: 'org.springframework.boot' - -jar { - baseName = 'gs-rest-service' - version = '0.1.0' -} - -repositories { - jcenter() -} - -dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" // Required for Kotlin integration - compile 'org.springframework.boot:spring-boot-starter-web' - testCompile('org.springframework.boot:spring-boot-starter-test') -} diff --git a/tutorials/spring-boot-restful/gradle/wrapper/gradle-wrapper.jar b/tutorials/spring-boot-restful/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 61901b9f38..0000000000 Binary files a/tutorials/spring-boot-restful/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/tutorials/spring-boot-restful/gradle/wrapper/gradle-wrapper.properties b/tutorials/spring-boot-restful/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 7ee0a5d774..0000000000 --- a/tutorials/spring-boot-restful/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Thu Jun 29 13:28:35 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip diff --git a/tutorials/spring-boot-restful/gradlew b/tutorials/spring-boot-restful/gradlew deleted file mode 100755 index 4453ccea33..0000000000 --- a/tutorials/spring-boot-restful/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save ( ) { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/tutorials/spring-boot-restful/gradlew.bat b/tutorials/spring-boot-restful/gradlew.bat deleted file mode 100644 index f9553162f1..0000000000 --- a/tutorials/spring-boot-restful/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/tutorials/spring-boot-restful/settings.gradle b/tutorials/spring-boot-restful/settings.gradle deleted file mode 100644 index b6ffe48bc5..0000000000 --- a/tutorials/spring-boot-restful/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'spring-boot-restful' - diff --git a/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/Application.kt b/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/Application.kt deleted file mode 100644 index 5ee00df7fb..0000000000 --- a/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/Application.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.jetbrains.kotlin.demo - -import org.springframework.boot.SpringApplication -import org.springframework.boot.autoconfigure.SpringBootApplication - -@SpringBootApplication -class Application - -fun main(args: Array) { - SpringApplication.run(Application::class.java, *args) -} \ No newline at end of file diff --git a/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/Greeting.kt b/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/Greeting.kt deleted file mode 100644 index 3756c62893..0000000000 --- a/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/Greeting.kt +++ /dev/null @@ -1,3 +0,0 @@ -package org.jetbrains.kotlin.demo - -data class Greeting(val id: Long, val content: String) diff --git a/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/GreetingController.kt b/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/GreetingController.kt deleted file mode 100644 index 30428eb4ab..0000000000 --- a/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/GreetingController.kt +++ /dev/null @@ -1,17 +0,0 @@ -package org.jetbrains.kotlin.demo - -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.RequestParam -import org.springframework.web.bind.annotation.RestController -import java.util.concurrent.atomic.AtomicLong - -@RestController -class GreetingController { - - val counter = AtomicLong() - - @GetMapping("/greeting") - fun greeting(@RequestParam(value = "name", defaultValue = "World") name: String) = - Greeting(counter.incrementAndGet(), "Hello, $name") - -} \ No newline at end of file