diff options
author | 2025-01-29 22:15:36 +0000 | |
---|---|---|
committer | 2025-01-29 22:32:04 +0000 | |
commit | cecd03c705f92bd6c2acf9f05308a14ab62cf69a (patch) | |
tree | 1df2a4f1e7e1a16ba724f9c61aa73ab5b01321e4 | |
parent | 0107d37aabc2d56aebc8ee62e25b177907411449 (diff) |
Stub kotlin-incremental-client
Bug: 392906864
Test: m kotlin-incremental-client
Change-Id: I39b170cf60410188cfefefe2164d943c5e0e4f4c
4 files changed, 114 insertions, 0 deletions
diff --git a/cmd/kotlinc_incremental/Android.bp b/cmd/kotlinc_incremental/Android.bp new file mode 100644 index 000000000..7816553ee --- /dev/null +++ b/cmd/kotlinc_incremental/Android.bp @@ -0,0 +1,65 @@ +// +// Copyright (C) 2025 The Android Open Source Project +// +// 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 { + default_team: "trendy_team_system_ui_please_use_a_more_specific_subteam_if_possible_", + default_applicable_licenses: [ + "Android-Apache-2.0", + "Kotlin_Incremental_license", + ], +} + +license { + name: "Kotlin_Incremental_license", + visibility: [":__subpackages__"], + license_kinds: ["legacy_proprietary"], +} + +java_library_host { + name: "kotlin-incremental-client-lib", + srcs: [ + "src/com/**/*.kt", + ], + static_libs: [ + "kotlin-compiler-embeddable", + "kotlin-compiler-runner", + "kotlin-daemon-client", + ], + + plugins: [], + + kotlincflags: [ + "-Werror", + ], +} + +java_binary_host { + name: "kotlin-incremental-client", + manifest: "kotlin-incremental-client.mf", + static_libs: ["kotlin-incremental-client-lib"], +} + +java_test_host { + name: "kotlin-incremental-client-tests", + srcs: [ + "tests/src/com/**/*.kt", + ], + static_libs: [ + "kotlin-incremental-client-lib", + "junit", + "truth", + ], +} diff --git a/cmd/kotlinc_incremental/kotlin-incremental-client.mf b/cmd/kotlinc_incremental/kotlin-incremental-client.mf new file mode 100644 index 000000000..b84c86ab2 --- /dev/null +++ b/cmd/kotlinc_incremental/kotlin-incremental-client.mf @@ -0,0 +1 @@ +Main-Class: com.android.kotlin.compiler.client.MainKt diff --git a/cmd/kotlinc_incremental/src/com/android/kotlin/compiler/client/Main.kt b/cmd/kotlinc_incremental/src/com/android/kotlin/compiler/client/Main.kt new file mode 100644 index 000000000..493864148 --- /dev/null +++ b/cmd/kotlinc_incremental/src/com/android/kotlin/compiler/client/Main.kt @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * 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 com.android.kotlin.compiler.client + +fun main(args: Array<String>) { + println("compiling") +} diff --git a/cmd/kotlinc_incremental/tests/src/com/android/kotlin/compiler/client/MainTest.kt b/cmd/kotlinc_incremental/tests/src/com/android/kotlin/compiler/client/MainTest.kt new file mode 100644 index 000000000..3354aa49c --- /dev/null +++ b/cmd/kotlinc_incremental/tests/src/com/android/kotlin/compiler/client/MainTest.kt @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2025 The Android Open Source Project + * + * 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 com.android.kotlin.compiler.client + +import com.google.common.truth.Truth.assertThat +import org.junit.Test + +class MainTest { + @Test + fun testMain() { + assertThat(true).isTrue() + } +}
\ No newline at end of file |