Merge branch 'main' into export-D39929963
This commit is contained in:
3
.github/workflows/validate-cpp.yml
vendored
3
.github/workflows/validate-cpp.yml
vendored
@@ -7,6 +7,9 @@ on:
|
|||||||
- main
|
- main
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
GTEST_COLOR: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Build and Test [${{ matrix.os }}][${{ matrix.mode }}]
|
name: Build and Test [${{ matrix.os }}][${{ matrix.mode }}]
|
||||||
|
2
enums.py
2
enums.py
@@ -162,7 +162,7 @@ for name, values in sorted(ENUMS.items()):
|
|||||||
f.write(get_license("java"))
|
f.write(get_license("java"))
|
||||||
f.write("package com.facebook.yoga;\n\n")
|
f.write("package com.facebook.yoga;\n\n")
|
||||||
if name in DO_NOT_STRIP:
|
if name in DO_NOT_STRIP:
|
||||||
f.write("import com.facebook.proguard.annotations.DoNotStrip;\n\n")
|
f.write("import com.facebook.yoga.annotations.DoNotStrip;\n\n")
|
||||||
f.write("@DoNotStrip\n")
|
f.write("@DoNotStrip\n")
|
||||||
f.write("public enum Yoga%s {\n" % name)
|
f.write("public enum Yoga%s {\n" % name)
|
||||||
if len(values) > 0:
|
if len(values) > 0:
|
||||||
|
@@ -19,6 +19,8 @@ android {
|
|||||||
minSdkVersion rootProject.minSdkVersion
|
minSdkVersion rootProject.minSdkVersion
|
||||||
targetSdkVersion rootProject.targetSdkVersion
|
targetSdkVersion rootProject.targetSdkVersion
|
||||||
|
|
||||||
|
consumerProguardFiles 'proguard-rules.pro'
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
||||||
}
|
}
|
||||||
@@ -47,7 +49,6 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
implementation 'com.google.code.findbugs:jsr305:3.0.2'
|
||||||
implementation project(':yoga:proguard-annotations')
|
|
||||||
implementation 'com.facebook.soloader:soloader:0.10.4'
|
implementation 'com.facebook.soloader:soloader:0.10.4'
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
}
|
}
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
import com.facebook.proguard.annotations.DoNotStrip;
|
import com.facebook.yoga.annotations.DoNotStrip;
|
||||||
|
|
||||||
@DoNotStrip
|
@DoNotStrip
|
||||||
public enum YogaLogLevel {
|
public enum YogaLogLevel {
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
import com.facebook.proguard.annotations.DoNotStrip;
|
import com.facebook.yoga.annotations.DoNotStrip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for receiving logs from native layer. Use by setting YogaNode.setLogger(myLogger);
|
* Interface for receiving logs from native layer. Use by setting YogaNode.setLogger(myLogger);
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
import com.facebook.proguard.annotations.DoNotStrip;
|
import com.facebook.yoga.annotations.DoNotStrip;
|
||||||
import com.facebook.soloader.SoLoader;
|
import com.facebook.soloader.SoLoader;
|
||||||
|
|
||||||
@DoNotStrip
|
@DoNotStrip
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
import com.facebook.proguard.annotations.DoNotStrip;
|
import com.facebook.yoga.annotations.DoNotStrip;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.proguard.annotations;
|
package com.facebook.yoga.annotations;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@@ -1,13 +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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
apply plugin: 'java'
|
|
||||||
|
|
||||||
sourceCompatibility = '1.7'
|
|
||||||
targetCompatibility = '1.7'
|
|
||||||
|
|
||||||
apply plugin: 'com.vanniktech.maven.publish'
|
|
@@ -1,12 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
#
|
|
||||||
# This source code is licensed under the MIT license found in the LICENSE
|
|
||||||
# file in the root directory of this source tree.
|
|
||||||
#
|
|
||||||
|
|
||||||
GROUP=com.facebook.yoga
|
|
||||||
POM_NAME=Proguard Annotations
|
|
||||||
POM_DESCRIPTION=Shared annotations for use with Proguard
|
|
||||||
POM_ARTIFACT_ID=proguard-annotations
|
|
||||||
POM_PACKAGING=jar
|
|
@@ -1,24 +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.proguard.annotations;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
import static java.lang.annotation.RetentionPolicy.CLASS;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add this annotation to a class to instruct Proguard to not strip it or any of its fields or
|
|
||||||
* methods out.
|
|
||||||
*
|
|
||||||
* <p>This is useful for methods called via reflection that could appear as unused to Proguard.
|
|
||||||
*/
|
|
||||||
@Target({ElementType.TYPE})
|
|
||||||
@Retention(CLASS)
|
|
||||||
public @interface DoNotStripAny {}
|
|
10
java/proguard-rules.pro
vendored
Normal file
10
java/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
-keep,allowobfuscation @interface com.facebook.yoga.annotations.DoNotStrip
|
||||||
|
-keep @com.facebook.yoga.annotations.DoNotStrip class *
|
||||||
|
-keepclassmembers class * {
|
||||||
|
@com.facebook.yoga.annotations.DoNotStrip *;
|
||||||
|
}
|
@@ -5,7 +5,6 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include ':yoga', ':yoga-layout', ':yoga:proguard-annotations'
|
include ':yoga', ':yoga-layout'
|
||||||
project(':yoga').projectDir = file('java')
|
project(':yoga').projectDir = file('java')
|
||||||
project(':yoga:proguard-annotations').projectDir = file('java/proguard-annotations')
|
|
||||||
project(':yoga-layout').projectDir = file('android')
|
project(':yoga-layout').projectDir = file('android')
|
||||||
|
Reference in New Issue
Block a user