Skip to content

Commit

Permalink
Include xml attribute strings from res-public to sourceSet. (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengdev authored Jun 8, 2021
1 parent c710cb7 commit 6aa7811
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 5 deletions.
5 changes: 5 additions & 0 deletions plugin-attribution/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ android {
isIncludeAndroidResources = true
}
}

sourceSets {
// limit amount of exposed library resources
getByName("main").res.srcDirs("src/main/res-public")
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion plugin-attribution/src/main/res-public/values/public.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<public name="mapbox_attributionIconColor" type="attr" />

<!-- Defines where the attribution icon is positioned on the map -->
<public name="mapbox_attributionGravity" type="attr" >
<public name="mapbox_attributionGravity" type="attr" />

<!-- Defines the margin to the left that the attribution icon honors. -->
<public name="mapbox_attributionMarginLeft" type="attr" />
Expand Down
5 changes: 5 additions & 0 deletions plugin-compass/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ android {
targetSdkVersion(AndroidVersions.targetSdkVersion)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

sourceSets {
// limit amount of exposed library resources
getByName("main").res.srcDirs("src/main/res-public")
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion plugin-compass/src/main/res-public/values/public.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<public name="mapbox_compassEnabled" type="attr" />

<!-- Defines where the compass is positioned on the map -->
<public name="mapbox_compassGravity" type="attr" >
<public name="mapbox_compassGravity" type="attr" />

<!-- Defines the margin to the left that the compass icon honors. -->
<public name="mapbox_compassMarginLeft" type="attr" />
Expand Down
5 changes: 5 additions & 0 deletions plugin-gestures/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ android {
isIncludeAndroidResources = true
}
}

sourceSets {
// limit amount of exposed library resources
getByName("main").res.srcDirs("src/main/res-public")
}
}

dependencies {
Expand Down
5 changes: 5 additions & 0 deletions plugin-locationcomponent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ android {
targetSdkVersion(AndroidVersions.targetSdkVersion)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

sourceSets {
// limit amount of exposed library resources
getByName("main").res.srcDirs("src/main/res-public")
}
}

dependencies {
Expand Down
5 changes: 5 additions & 0 deletions plugin-logo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ android {
targetSdkVersion(AndroidVersions.targetSdkVersion)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

sourceSets {
// limit amount of exposed library resources
getByName("main").res.srcDirs("src/main/res-public")
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion plugin-logo/src/main/res-public/values/public.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<public name="mapbox_logoEnabled" type="attr" />

<!-- Defines where the logo is positioned on the map -->
<public name="mapbox_logoGravity" type="attr" >
<public name="mapbox_logoGravity" type="attr" />

<!-- Defines the margin to the left that the attribution icon honors. -->
<public name="mapbox_logoMarginLeft" type="attr" />
Expand Down
5 changes: 5 additions & 0 deletions plugin-scalebar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ android {
targetSdkVersion(AndroidVersions.targetSdkVersion)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

sourceSets {
// limit amount of exposed library resources
getByName("main").res.srcDirs("src/main/res-public")
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion plugin-scalebar/src/main/res-public/values/public.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<public name="mapbox_scaleBarEnabled" type="attr" />

<!-- Defines where the scale bar is positioned on the map -->
<public name="mapbox_scaleBarGravity" type="attr" >
<public name="mapbox_scaleBarGravity" type="attr" />

<!-- Defines the margin to the left that the scale bar honors. -->
<public name="mapbox_scaleBarMarginLeft" type="attr" />
Expand Down
5 changes: 5 additions & 0 deletions sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ android {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
}

sourceSets {
// limit amount of exposed library resources
getByName("main").res.srcDirs("src/main/res-public")
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/res-public/values/public.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
<public name="mapbox_cameraPaddingRight" type="attr"/>

<!-- The default style uri to load when no style is set. -->
<attr name="mapbox_styleUri" format="string" />
<public name="mapbox_styleUri" type="attr" />
</resources>

0 comments on commit 6aa7811

Please sign in to comment.