File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
src/main/java/org/moe/gradle Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 2424import org .gradle .api .tasks .Internal ;
2525import org .gradle .api .tasks .OutputFile ;
2626import org .gradle .api .tasks .SourceSet ;
27+ import org .moe .common .utils .NativeUtil ;
2728import org .moe .gradle .MoeExtension ;
2829import org .moe .gradle .MoePlugin ;
2930import org .moe .gradle .MoeSDK ;
3637import org .moe .gradle .utils .Arch ;
3738import org .moe .gradle .utils .Mode ;
3839import org .moe .gradle .utils .Require ;
39- import org .moe .gradle .utils .TaskUtils ;
4040
4141import java .io .File ;
4242import java .io .IOException ;
@@ -268,7 +268,7 @@ protected void run() {
268268 } else {
269269 exec (spec -> {
270270 // Set executable
271- if (TaskUtils .isHostAARCH64 () && !Arch .FAMILY_ARM64 .equalsIgnoreCase (getArchFamily ())) {
271+ if (NativeUtil .isHostAARCH64 () && !Arch .FAMILY_ARM64 .equalsIgnoreCase (getArchFamily ())) {
272272 // Run dex2oat using rosetta 2 when compiling non-arm64 target on Apple silicon
273273 // because currently the arm64 version of dex2oat does not work reliably due to
274274 // the issue of word size & alignment mismatch.
Original file line number Diff line number Diff line change 2828import org .gradle .process .ExecSpec ;
2929import org .gradle .process .JavaExecSpec ;
3030import org .moe .gradle .AbstractMoePlugin ;
31- import org .moe .gradle .MoePlugin ;
3231import org .moe .gradle .anns .NotNull ;
3332import org .moe .gradle .anns .Nullable ;
3433import org .moe .gradle .groovy .closures .TaskClosure ;
@@ -47,11 +46,6 @@ public class TaskUtils {
4746 private TaskUtils () {
4847 }
4948
50- public static boolean isHostAARCH64 () {
51- String arch = System .getProperty ("os.arch" );
52- return arch != null && arch .toLowerCase ().contains ("aarch64" );
53- }
54-
5549 public static void assertSize (@ NotNull List <String > elements , int count , @ NotNull String desc ) {
5650 Require .nonNull (elements );
5751 Require .GE (count , 0 , null );
You can’t perform that action at this time.
0 commit comments