Migrate YogaNodeFactory
to Kotlin (#1832)
Summary: Migrate com.facebook.yoga.YogaNodeFactory to Kotlin. Pull Request resolved: https://github.com/facebook/yoga/pull/1832 Test Plan: RN ```sh yarn android yarn test-android ``` Yoga ```sh ./gradlew :yoga:assembleDebug ``` Reviewed By: zielinskimz Differential Revision: D79897733 Pulled By: cortinico fbshipit-source-id: 3ea4f5635eb8c910719c13d3087356b96b6f0746
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cf50bc9adf
commit
c54215fd77
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.yoga;
|
||||
|
||||
public abstract class YogaNodeFactory {
|
||||
public static YogaNode create() {
|
||||
return new YogaNodeJNIFinalizer();
|
||||
}
|
||||
|
||||
public static YogaNode create(YogaConfig config) {
|
||||
return new YogaNodeJNIFinalizer(config);
|
||||
}
|
||||
}
|
14
java/com/facebook/yoga/YogaNodeFactory.kt
Normal file
14
java/com/facebook/yoga/YogaNodeFactory.kt
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.yoga
|
||||
|
||||
public object YogaNodeFactory {
|
||||
@JvmStatic public fun create(): YogaNode = YogaNodeJNIFinalizer()
|
||||
|
||||
@JvmStatic public fun create(config: YogaConfig): YogaNode = YogaNodeJNIFinalizer(config)
|
||||
}
|
Reference in New Issue
Block a user