Skip to content

Commit e1f9ed4

Browse files
New arch only for Android
1 parent 0881c6f commit e1f9ed4

File tree

7 files changed

+11
-254
lines changed

7 files changed

+11
-254
lines changed

package/android/build.gradle

+11-23
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1-
def isNewArchitectureEnabled() {
2-
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
3-
}
41

5-
if (isNewArchitectureEnabled()) {
6-
buildscript {
7-
repositories {
8-
mavenCentral()
9-
google()
10-
}
2+
buildscript {
3+
repositories {
4+
mavenCentral()
5+
google()
6+
}
117

12-
dependencies {
13-
classpath("com.android.tools.build:gradle:7.1.1")
14-
classpath("com.facebook.react:react-native-gradle-plugin")
15-
classpath("de.undercouch:gradle-download-task:5.0.1")
16-
}
8+
dependencies {
9+
classpath("com.android.tools.build:gradle:7.1.1")
10+
classpath("com.facebook.react:react-native-gradle-plugin")
11+
classpath("de.undercouch:gradle-download-task:5.0.1")
1712
}
1813
}
1914

2015
apply plugin: 'com.android.library'
21-
if (isNewArchitectureEnabled()) {
22-
apply plugin: 'com.facebook.react'
23-
}
16+
apply plugin: 'com.facebook.react'
2417

2518
def getExtOrDefault(name) {
2619
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['ReactNativeSlider_' + name]
@@ -49,16 +42,11 @@ android {
4942
defaultConfig {
5043
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
5144
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
52-
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
5345
}
5446

5547
sourceSets {
5648
main {
57-
if (isNewArchitectureEnabled()) {
58-
java.srcDirs += ['src/newarch', "${project.buildDir}/generated/source/codegen/java"]
59-
} else {
60-
java.srcDirs += ['src/oldarch']
61-
}
49+
java.srcDirs += ['src', "${project.buildDir}/generated/source/codegen/java"]
6250
}
6351
}
6452
}

package/android/src/main/java/com/reactnativecommunity/slider/ReactSlider.java

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/**
2-
* Copyright (c) Facebook, Inc. and its affiliates.
3-
*
4-
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
5-
* directory of this source tree.
6-
*/
71
package com.reactnativecommunity.slider;
82

93
import android.content.Context;

package/android/src/main/java/com/reactnativecommunity/slider/ReactSliderEvent.java

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/**
2-
* Copyright (c) Facebook, Inc. and its affiliates.
3-
*
4-
* This source code is licensed under the MIT license found in the
5-
* LICENSE file in the root directory of this source tree.
6-
*/
7-
81
package com.reactnativecommunity.slider;
92

103
import androidx.annotation.Nullable;

package/android/src/main/java/com/reactnativecommunity/slider/ReactSlidingCompleteEvent.java

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/**
2-
* Copyright (c) Facebook, Inc. and its affiliates.
3-
*
4-
* This source code is licensed under the MIT license found in the
5-
* LICENSE file in the root directory of this source tree.
6-
*/
7-
81
package com.reactnativecommunity.slider;
92

103
import androidx.annotation.Nullable;

package/android/src/main/java/com/reactnativecommunity/slider/ReactSlidingStartEvent.java

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/**
2-
* Copyright (c) Facebook, Inc. and its affiliates.
3-
*
4-
* This source code is licensed under the MIT license found in the
5-
* LICENSE file in the root directory of this source tree.
6-
*/
7-
81
package com.reactnativecommunity.slider;
92

103
import androidx.annotation.Nullable;

package/android/src/oldarch/java/com/reactnativecommunity/slider/ReactSliderManager.java

-204
This file was deleted.

0 commit comments

Comments
 (0)