Skip to content

Commit

Permalink
Buck migration (#1017)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #1017

Differential Revision: D62586371
  • Loading branch information
Peng Jiang authored and facebook-github-bot committed Sep 23, 2024
1 parent 8d73b47 commit 309a031
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@

[cxx]
link_path_normalization_args_enabled = true

[repositories]
root = .
Empty file removed .buckroot
Empty file.
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ subprojects {

plugins.withType(org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin) {
kotlin {
jvmToolchain(11)
jvmToolchain(17)
}
}

Expand Down Expand Up @@ -126,8 +126,8 @@ ext {
targetSdkVersion = latestSdkVersion
compileSdkVersion = latestSdkVersion
buildToolsVersion = '34.0.0'
sourceCompatibilityVersion = JavaVersion.VERSION_11
targetCompatibilityVersion = JavaVersion.VERSION_11
sourceCompatibilityVersion = JavaVersion.VERSION_17
targetCompatibilityVersion = JavaVersion.VERSION_17
}

ext.forceReleaseBuild = project.hasProperty('forceReleaseBuild')
Expand Down Expand Up @@ -166,6 +166,7 @@ ext.deps = [
lifecycle : 'androidx.lifecycle:lifecycle-runtime:2.6.1',
viewModel : 'androidx.lifecycle:lifecycle-viewmodel:2.3.1',
liveData : 'androidx.lifecycle:lifecycle-livedata:2.6.1',
lifecycleService : 'androidx.lifecycle:lifecycle-service:2.6.1',
// First-party
fresco : 'com.facebook.fresco:fresco:3.0.0',
frescoVito : 'com.facebook.fresco:vito:3.0.0',
Expand All @@ -182,7 +183,7 @@ ext.deps = [
inferAnnotations : 'com.facebook.infer.annotation:infer-annotation:0.18.0',
// Debugging and testing
guava : 'com.google.guava:guava:27.0.1-android',
robolectric : 'org.robolectric:robolectric:4.9.2',
robolectric : 'org.robolectric:robolectric:4.11.1',
junit : 'junit:junit:4.12',
hamcrestLibrary : 'org.hamcrest:hamcrest-library:1.3',
powermockMockito : 'org.powermock:powermock-api-mockito2:2.0.7',
Expand Down
6 changes: 3 additions & 3 deletions lib/yoga/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ dependencies {
task buckBuild(type: Exec) {
workingDir rootDir
environment BUCKVERSION: System.getenv('BUCKVERSION') ?: 'last'
def buckPath = System.getenv('BUCK_PATH') ?: 'buck2'
commandLine buckPath, 'build', '//lib/yogajni:jni[shared]', '--show-output'
def buckPath = System.getenv('BUCK_PATH')
commandLine buckPath, 'build', '//lib/yogajni:jni#default,shared'
doLast {
System.out.println("[Yoga Buck Build]: exit value: ${executionResult.get().exitValue}")
def build_outputs = executionResult.get().exitValue.trim()
def build_outputs = 'find buck-out/gen/lib/yogajni/jni#default,shared/'.execute().text.trim()
System.out.println("[Yoga Buck Build]: build outputs:\n${build_outputs}")
}
}
2 changes: 1 addition & 1 deletion litho-intellij-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
}

intellij {
version = '2020.1'
version = '2024.1'
updateSinceUntilBuild = false
plugins = ['java', 'org.jetbrains.kotlin',]
}
Expand Down
1 change: 1 addition & 0 deletions litho-rendercore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ dependencies {
testImplementation deps.mockitokotlin
testImplementation deps.supportAppCompat
testImplementation deps.supportTestCore
testImplementation deps.lifecycleService
testImplementation project(":litho-rendercore-testing")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ class MountStateTest {
@Test
fun onMountNestedRenderTree_MountStateShouldHostExpectedState() {
val c: Context = RuntimeEnvironment.application
val root: LayoutResult? =
val root: LayoutResult =
SimpleLayoutResult.create()
.width(1000)
.height(1000)
Expand Down Expand Up @@ -560,7 +560,7 @@ class MountStateTest {
val unbindOrder: MutableList<Any?> = ArrayList()
val bindBinder = TestBinder<Any>(bindOrder, unbindOrder)
val mountBinder = TestBinder<Any>(bindOrder, unbindOrder)
val root: LayoutResult? =
val root: LayoutResult =
SimpleLayoutResult.create()
.width(200)
.height(200)
Expand Down Expand Up @@ -600,7 +600,7 @@ class MountStateTest {
val unbindOrder: MutableList<Any?> = ArrayList()
val attachBinder = TestBinder<Any>(bindOrder, unbindOrder)
val mountBinder = TestBinder<Any>(bindOrder, unbindOrder)
val root: LayoutResult? =
val root: LayoutResult =
SimpleLayoutResult.create()
.width(200)
.height(200)
Expand Down Expand Up @@ -646,7 +646,7 @@ class MountStateTest {
val unbindOrder: MutableList<Any?> = ArrayList()
val attachBinder = TestBinder<Any>(bindOrder, unbindOrder)
val mountBinder = TestBinder<Any>(bindOrder, unbindOrder)
val root: LayoutResult? =
val root: LayoutResult =
SimpleLayoutResult.create()
.width(200)
.height(200)
Expand Down Expand Up @@ -690,7 +690,7 @@ class MountStateTest {
@Test
fun onNotifyMountUnmount_ShouldUpdateMountItemCount() {
val c: Context = RuntimeEnvironment.application
val root: LayoutResult? =
val root: LayoutResult =
SimpleLayoutResult.create()
.width(1000)
.height(1000)
Expand Down Expand Up @@ -761,7 +761,7 @@ class MountStateTest {
"""
.trimIndent())
val c = renderCoreTestRule.context
val root: LayoutResult? =
val root: LayoutResult =
SimpleLayoutResult.create()
.renderUnit(ViewWrapperUnit(LinearLayout(c), 1))
.width(100)
Expand All @@ -785,7 +785,7 @@ class MountStateTest {
val unbindOrder: MutableList<Any?> = ArrayList()
val bindBinder = TestBinderWithBindData<Any>(bindOrder, unbindOrder, 1)
val mountBinder = TestBinderWithBindData<Any>(bindOrder, unbindOrder, 2)
val root: LayoutResult? =
val root: LayoutResult =
SimpleLayoutResult.create()
.width(200)
.height(200)
Expand Down

0 comments on commit 309a031

Please sign in to comment.