-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update new module script to use geo-compose toolkit component #148
Changes from 2 commits
25b8e02
5e0e282
020edcf
43b6c11
b14cd8d
087e343
a57cbc7
ce55d2a
f3d8f68
40c1f99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the new module created when the script is used, but I don't think it should require any sample changes. The The module script can spin up a sample with touch event implementation, but let's keep this sample similar to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am fine with this change. Although with the previous version of |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,6 @@ private void createFilesAndFolders() { | |
|
||
// Copy Kotlin template files to new sample | ||
File mainActivityTemplate = new File(samplesRepoPath + "/tools/NewModuleScript/MainActivityTemplate.kt"); | ||
File composeMapViewTemplate = new File(samplesRepoPath + "/tools/NewModuleScript/ComposeMapViewTemplate.kt"); | ||
File mapViewModelTemplate = new File(samplesRepoPath + "/tools/NewModuleScript/MapViewModelTemplate.kt"); | ||
File mainScreenTemplate = new File(samplesRepoPath + "/tools/NewModuleScript/MainScreenTemplate.kt"); | ||
|
||
|
@@ -111,9 +110,6 @@ private void createFilesAndFolders() { | |
|
||
File composeComponentsDir = new File(packageDirectory + "/components"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this be renamed to |
||
composeComponentsDir.mkdirs(); | ||
FileUtils.copyFileToDirectory(composeMapViewTemplate, composeComponentsDir); | ||
source = Paths.get(composeComponentsDir+"/ComposeMapViewTemplate.kt"); | ||
Files.move(source, source.resolveSibling("ComposeMapView.kt")); | ||
|
||
FileUtils.copyFileToDirectory(mapViewModelTemplate, composeComponentsDir); | ||
source = Paths.get(composeComponentsDir+"/MapViewModelTemplate.kt"); | ||
|
@@ -201,18 +197,6 @@ private void updateSampleContent() { | |
exitProgram(e); | ||
} | ||
|
||
//Update ComposeMapView.kt | ||
file = new File(samplesRepoPath + "/" + sampleWithHyphen + "/src/main/java/com/esri/arcgismaps/sample/"+sampleWithoutSpaces+"/components/ComposeMapView.kt"); | ||
try { | ||
String fileContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8); | ||
fileContent = fileContent.replace("Copyright 2023", "Copyright " + Calendar.getInstance().get(Calendar.YEAR)); | ||
fileContent = fileContent.replace("sample.displaycomposablemapview", "sample." + sampleWithoutSpaces); | ||
FileUtils.write(file,fileContent, StandardCharsets.UTF_8); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
exitProgram(e); | ||
} | ||
|
||
//Update MapViewModel.kt | ||
file = new File(samplesRepoPath + "/" + sampleWithHyphen + "/src/main/java/com/esri/arcgismaps/sample/"+sampleWithoutSpaces+"/components/MapViewModel.kt"); | ||
try { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update this sample with the flag
arcgisToolkitVersion
and update theversions.gradle
with the build tag of geo-compose: