feat(templates): add no activity template

This commit is contained in:
Akash Yadav
2023-05-18 22:48:24 +05:30
parent 08020cb026
commit 05415d444f
2 changed files with 40 additions and 0 deletions
@@ -0,0 +1,32 @@
/*
* This file is part of AndroidIDE.
*
* AndroidIDE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AndroidIDE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
*/
package com.itsaky.androidide.templates.impl.noActivity
import com.itsaky.androidide.templates.base.baseProject
import com.itsaky.androidide.templates.base.modules.android.defaultAppModule
import com.itsaky.androidide.templates.impl.base.emptyThemesAndColors
fun noActivityProjectTemplate() = baseProject {
defaultAppModule {
recipe = {
res {
emptyThemesAndColors(actionBar = true)
}
}
}
}
@@ -27,6 +27,7 @@ import com.itsaky.androidide.templates.impl.basicActivity.basicActivityProject
import com.itsaky.androidide.templates.impl.bottomNavActivity.bottomNavActivityProject
import com.itsaky.androidide.templates.impl.emptyActivity.emptyActivityProject
import com.itsaky.androidide.templates.impl.navDrawerActivity.navDrawerActivityProject
import com.itsaky.androidide.templates.impl.noActivity.noActivityProjectTemplate
import com.itsaky.androidide.templates.impl.tabbedActivity.tabbedActivityProject
import com.itsaky.androidide.xml.permissions.Permission.INTERNET
import com.squareup.javapoet.ArrayTypeName
@@ -164,4 +165,11 @@ class TemplateBuilderTest {
tabbedActivityProject()
}
}
@Test
fun `test no activity project`() {
testTemplate("NoActivity") {
noActivityProjectTemplate()
}
}
}