diff --git a/.idea/libraries/android_layoutlib.xml b/.idea/libraries/android_layoutlib.xml new file mode 100644 index 00000000000..742d5b1fa7c --- /dev/null +++ b/.idea/libraries/android_layoutlib.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index d9a277ce3b1..d6670b3ae98 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -9,6 +9,7 @@ + diff --git a/libraries/pom.xml b/libraries/pom.xml index c3a0494b32a..22e9b9ed440 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -99,6 +99,7 @@ tools/kotlin-script-util tools/kotlin-android-extensions + tools/kotlin-android-extensions-runtime tools/kotlin-maven-plugin-test examples/annotation-processor-example diff --git a/libraries/tools/kotlin-android-extensions-runtime/pom.xml b/libraries/tools/kotlin-android-extensions-runtime/pom.xml new file mode 100644 index 00000000000..d65e2bc8e78 --- /dev/null +++ b/libraries/tools/kotlin-android-extensions-runtime/pom.xml @@ -0,0 +1,57 @@ + + + + 4.0.0 + + 1.4.1 + 3.0.4 + + + + org.jetbrains.kotlin + kotlin-project + 1.1-SNAPSHOT + ../../pom.xml + + + kotlin-android-extensions-runtime + jar + + A runtime library for Kotlin Android Extensions plugin + + + + org.jetbrains.kotlin + kotlin-stdlib + ${project.version} + + + com.google.android + android + 2.3.1 + provided + + + + + ${basedir}/../../../plugins/android-extensions/android-extensions-runtime/src + + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${project.version} + + + + compile + compile + compile + + + + + + diff --git a/libraries/tools/kotlin-android-extensions/pom.xml b/libraries/tools/kotlin-android-extensions/pom.xml index 58a4ccaf0d6..cd7816b1088 100644 --- a/libraries/tools/kotlin-android-extensions/pom.xml +++ b/libraries/tools/kotlin-android-extensions/pom.xml @@ -8,6 +8,7 @@ 1.4.1 3.0.4 ${basedir}/../../../plugins/android-extensions/android-extensions-compiler/src + ${basedir}/../../../plugins/android-extensions/android-extensions-runtime/src ${basedir}/target/src ${basedir}/target/resource @@ -30,6 +31,12 @@ kotlin-compiler-embeddable ${project.version} + + com.google.android + android + 2.3.1 + provided + @@ -55,6 +62,7 @@ ${android-extensions.target-src} ${android-extensions.src} + ${android-extensions-runtime.src} diff --git a/plugins/android-extensions/android-extensions-runtime/android-extensions-runtime.iml b/plugins/android-extensions/android-extensions-runtime/android-extensions-runtime.iml new file mode 100644 index 00000000000..8ca9d47ce2a --- /dev/null +++ b/plugins/android-extensions/android-extensions-runtime/android-extensions-runtime.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/CacheImplementation.kt b/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/CacheImplementation.kt new file mode 100644 index 00000000000..7c4956090da --- /dev/null +++ b/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/CacheImplementation.kt @@ -0,0 +1,25 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * 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 kotlinx.android.extensions + +public enum class CacheImplementation { + HASH_MAP, + NO_CACHE; + + public val hasCache: Boolean + get() = this != NO_CACHE +} \ No newline at end of file diff --git a/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/ContainerOptions.kt b/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/ContainerOptions.kt new file mode 100644 index 00000000000..a1bcf448215 --- /dev/null +++ b/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/ContainerOptions.kt @@ -0,0 +1,23 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * 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 kotlinx.android.extensions + +import kotlinx.android.extensions.CacheImplementation.* + +public annotation class ContainerOptions( + public val cache: CacheImplementation = HASH_MAP +) \ No newline at end of file diff --git a/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/LayoutContainer.kt b/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/LayoutContainer.kt new file mode 100644 index 00000000000..320fef00109 --- /dev/null +++ b/plugins/android-extensions/android-extensions-runtime/src/kotlinx/android/extensions/LayoutContainer.kt @@ -0,0 +1,23 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * 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 kotlinx.android.extensions + +import android.view.View + +public interface LayoutContainer { + public val containerView: View? +} \ No newline at end of file